[ncview] 08/31: Imported Upstream version 2.1

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Sat Apr 18 00:43:39 UTC 2015


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

sebastic pushed a commit to branch master
in repository ncview.

commit e4bdbc184641ee12a44cba8259fba6ead2f2f47a
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Sat Apr 18 01:40:24 2015 +0200

    Imported Upstream version 2.1
---
 .gmtcommands4                          |    0
 Makefile                               |  627 ------
 Makefile.in                            |   16 +-
 README_LOCAL                           |    4 +
 aclocal.m4                             |    2 +-
 autom4te.cache/output.0                |  983 ++++++----
 autom4te.cache/output.1                |  983 ++++++----
 autom4te.cache/requests                |   22 +-
 autom4te.cache/traces.0                |  280 +--
 autom4te.cache/traces.1                |  303 ++-
 config.h                               |   80 -
 config.h.in                            |    3 +
 config.h.in~                           |    3 +
 config.log                             | 1304 -------------
 config.status                          | 1085 -----------
 configure                              |  981 ++++++----
 configure.in                           |   95 +-
 m4macros/png.m4                        |  119 ++
 m4macros/ppm.m4                        |  109 --
 m4macros/udunits2.m4                   |   17 +-
 src/.deps/RadioWidget.Po               |  291 ---
 src/.deps/SciPlot.Po                   |  138 --
 src/.deps/calcalcs.Po                  |   86 -
 src/.deps/cbar.Po                      |  298 ---
 src/.deps/dataedit.Po                  |  289 ---
 src/.deps/display_info.Po              |  289 ---
 src/.deps/do_buttons.Po                |  287 ---
 src/.deps/do_print.Po                  |  287 ---
 src/.deps/epic_time.Po                 |  287 ---
 src/.deps/file.Po                      |  287 ---
 src/.deps/file_netcdf.Po               |  287 ---
 src/.deps/filesel.Po                   |  288 ---
 src/.deps/geteuid.Po                   |   74 -
 src/.deps/interface.Po                 |  289 ---
 src/.deps/ncview.Po                    |  310 ---
 src/.deps/overlay.Po                   |  294 ---
 src/.deps/plot_range.Po                |  291 ---
 src/.deps/plot_xy.Po                   |  288 ---
 src/.deps/printer_options.Po           |  289 ---
 src/.deps/range.Po                     |  290 ---
 src/.deps/set_options.Po               |  291 ---
 src/.deps/udu.Po                       |  289 ---
 src/.deps/utCalendar2_cal.Po           |   93 -
 src/.deps/util.Po                      |  292 ---
 src/.deps/utils.Po                     |  288 ---
 src/.deps/view.Po                      |  287 ---
 src/.deps/x_interface.Po               |  300 ---
 src/.overlay.c.swp                     |  Bin 16384 -> 0 bytes
 src/Makefile                           |  703 -------
 src/Makefile.am                        |   14 +-
 src/Makefile.in                        |   68 +-
 src/RadioWidget.o                      |  Bin 5832 -> 0 bytes
 src/SciPlot.o                          |  Bin 81032 -> 0 bytes
 src/calcalcs.o                         |  Bin 33808 -> 0 bytes
 src/cbar.o                             |  Bin 140048 -> 0 bytes
 src/colormaps_banded.h                 |   44 +
 src/colormaps_blu_red.h                |   44 +
 src/colormaps_blue_red.h               |   44 +
 src/colormaps_bright.h                 |   44 +
 src/colormaps_jaisn2.h                 |   44 +
 src/colormaps_jaisnb.h                 |   44 +
 src/colormaps_jaisnc.h                 |   44 +
 src/colormaps_jaisnd.h                 |   44 +
 src/colormaps_jaison.h                 |   44 +
 src/colormaps_jet.h                    |   37 +
 src/colormaps_manga.h                  |   40 +
 src/colormaps_rainbow.h                |   44 +
 src/colormaps_roullet.h                |   40 +
 src/colormaps_wheel.h                  |   40 +
 src/dataedit.o                         |  Bin 9040 -> 0 bytes
 src/display_info.o                     |  Bin 4904 -> 0 bytes
 src/do_buttons.c                       |    8 +-
 src/do_buttons.o                       |  Bin 7472 -> 0 bytes
 src/do_print.o                         |  Bin 20880 -> 0 bytes
 src/epic_time.o                        |  Bin 3488 -> 0 bytes
 src/file.c                             |   63 +-
 src/file.o                             |  Bin 15520 -> 0 bytes
 src/file_netcdf.c                      |   51 +-
 src/file_netcdf.o                      |  Bin 41584 -> 0 bytes
 src/filesel.o                          |  Bin 13008 -> 0 bytes
 src/geteuid                            |  Bin 9516 -> 0 bytes
 src/geteuid.o                          |  Bin 1560 -> 0 bytes
 src/handle_rc_file.c                   |  165 ++
 src/interface.o                        |  Bin 12120 -> 0 bytes
 src/interface/RadioWidget.c            |   33 +-
 src/interface/RadioWidget.h            |   10 +-
 src/interface/cbar.c                   |   35 +-
 src/interface/colormap_funcs.c         |  760 ++++++++
 src/interface/filesel.c                |   19 +-
 src/interface/interface.c              |    9 +
 src/interface/make_tc_data.c           |  181 ++
 src/interface/plot_range.c             |    5 +-
 src/interface/plot_xy.c                |   10 +-
 src/interface/printer_options.c        |   21 +-
 src/interface/range.c                  |    5 +-
 src/interface/set_options.c            |  719 ++++++-
 src/interface/x_interface.c            |  710 +++----
 src/interface/x_interface.dumpframes.c | 3280 --------------------------------
 src/ncview                             |  Bin 3206105 -> 0 bytes
 src/ncview.c                           |   70 +-
 src/ncview.defines.h                   |  112 +-
 src/ncview.includes.h                  |    3 +
 src/ncview.o                           |  Bin 131864 -> 0 bytes
 src/ncview.protos.h                    |   42 +-
 src/overlay.c                          |   15 +-
 src/overlay.o                          |  Bin 1670896 -> 0 bytes
 src/plot_range.o                       |  Bin 8704 -> 0 bytes
 src/plot_xy.o                          |  Bin 24560 -> 0 bytes
 src/printer_options.o                  |  Bin 21472 -> 0 bytes
 src/range.o                            |  Bin 17632 -> 0 bytes
 src/set_options.o                      |  Bin 11992 -> 0 bytes
 src/stringlist.c                       | 1206 ++++++++++++
 src/stringlist.h                       |   73 +
 src/tsh                                |    1 +
 src/udu.c                              |   47 +-
 src/udu.o                              |  Bin 10248 -> 0 bytes
 src/utCalendar2_cal.c                  |  111 +-
 src/utCalendar2_cal.o                  |  Bin 17424 -> 0 bytes
 src/util.c                             | 1227 +++++++-----
 src/util.o                             |  Bin 48912 -> 0 bytes
 src/util_2009-01-01.c                  | 1877 ------------------
 src/utils.o                            |  Bin 1736 -> 0 bytes
 src/view.c                             |  162 +-
 src/view.o                             |  Bin 85712 -> 0 bytes
 src/x_interface.o                      |  Bin 124288 -> 0 bytes
 stamp-h1                               |    1 -
 126 files changed, 7750 insertions(+), 18758 deletions(-)

diff --git a/.gmtcommands4 b/.gmtcommands4
new file mode 100644
index 0000000..e69de29
diff --git a/Makefile b/Makefile
deleted file mode 100644
index 182ad22..0000000
--- a/Makefile
+++ /dev/null
@@ -1,627 +0,0 @@
-# Makefile.in generated by automake 1.10.1 from Makefile.am.
-# Makefile.  Generated from Makefile.in by configure.
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-
-pkgdatadir = $(datadir)/ncview
-pkglibdir = $(libdir)/ncview
-pkgincludedir = $(includedir)/ncview
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-subdir = .
-DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
-	$(srcdir)/Makefile.in $(srcdir)/config.h.in \
-	$(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
-	depcomp install-sh missing
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4macros/netcdf.m4 \
-	$(top_srcdir)/m4macros/ppm.m4 \
-	$(top_srcdir)/m4macros/udunits2.m4 $(top_srcdir)/configure.in
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
- configure.lineno config.status.lineno
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES =
-SOURCES =
-DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
-	html-recursive info-recursive install-data-recursive \
-	install-dvi-recursive install-exec-recursive \
-	install-html-recursive install-info-recursive \
-	install-pdf-recursive install-ps-recursive install-recursive \
-	installcheck-recursive installdirs-recursive pdf-recursive \
-	ps-recursive uninstall-recursive
-RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
-  distclean-recursive maintainer-clean-recursive
-ETAGS = etags
-CTAGS = ctags
-DIST_SUBDIRS = $(SUBDIRS)
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-am__remove_distdir = \
-  { test ! -d $(distdir) \
-    || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
-         && rm -fr $(distdir); }; }
-DIST_ARCHIVES = $(distdir).tar.gz
-GZIP_ENV = --best
-distuninstallcheck_listfiles = find . -type f -print
-distcleancheck_listfiles = find . -type f -print
-ACLOCAL = ${SHELL} /home/pierce/src/mine/ncview/ncview-2.0beta3/missing --run aclocal-1.10
-AMTAR = ${SHELL} /home/pierce/src/mine/ncview/ncview-2.0beta3/missing --run tar
-AUTOCONF = ${SHELL} /home/pierce/src/mine/ncview/ncview-2.0beta3/missing --run autoconf
-AUTOHEADER = ${SHELL} /home/pierce/src/mine/ncview/ncview-2.0beta3/missing --run autoheader
-AUTOMAKE = ${SHELL} /home/pierce/src/mine/ncview/ncview-2.0beta3/missing --run automake-1.10
-AWK = mawk
-CC = cc
-CCDEPMODE = depmode=gcc3
-CFLAGS = 
-CPP = cc -E
-CPPFLAGS = 
-CYGPATH_W = echo
-DEFS = -DHAVE_CONFIG_H
-DEPDIR = .deps
-DO_PPM_INCDIR = #PPMINCDIR = -I
-DO_PPM_LIBDIR = #PPMLIBDIR = -I
-DO_PPM_LIBNAME = #PPMLIB = -lnetpbm
-DO_PPM_LINE = #INC_PPM   = -DINC_PPM
-DO_UDUNITS2_INCDIR = UDUNITS2INCDIR = -I/home/pierce/include
-DO_UDUNITS2_LIBDIR = UDUNITS2LIBDIR = -L/home/pierce/lib
-DO_UDUNITS2_LIBNAME = UDUNITS2LIB = -ludunits2
-DO_UDUNITS2_LINE = INC_UDUNITS2   = -DINC_UDUNITS2
-ECHO_C = 
-ECHO_N = -n
-ECHO_T = 
-EGREP = /bin/grep -E
-EXEEXT = 
-GREP = /bin/grep
-HAS_NC_CONFIG = yes
-INSTALL = /usr/bin/install -c
-INSTALL_DATA = ${INSTALL} -m 644
-INSTALL_PROGRAM = ${INSTALL}
-INSTALL_SCRIPT = ${INSTALL}
-INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
-LDFLAGS = 
-LIBOBJS = 
-LIBS = 
-LTLIBOBJS = 
-MAKEINFO = ${SHELL} /home/pierce/src/mine/ncview/ncview-2.0beta3/missing --run makeinfo
-MKDIR_P = /bin/mkdir -p
-NETCDF_CC = cc
-NETCDF_CPPFLAGS = -I/home/pierce/include
-NETCDF_LDFLAGS = -L/home/pierce/lib -lnetcdf -L/home/pierce/lib -lhdf5_hl -lhdf5 -lz -lm
-NETCDF_LIBS = 
-NETCDF_VERSION = netCDF 4.1-beta2
-OBJEXT = o
-PACKAGE = ncview
-PACKAGE_BUGREPORT = dpierce at ucsd.edu
-PACKAGE_NAME = ncview
-PACKAGE_STRING = ncview 2.0.0
-PACKAGE_TARNAME = ncview
-PACKAGE_VERSION = 2.0.0
-PATH_SEPARATOR = :
-PPM_INCDIR = 
-PPM_LIBDIR = 
-PPM_LIBNAME = netpbm
-PREFIX = /home/pierce
-RPATH_FLAGS =  -Wl,-R,/home/pierce/lib -Wl,-R,/home/pierce/lib -Wl,-R,/home/pierce/lib -Wl,-R,/home/pierce/lib
-SET_MAKE = 
-SHELL = /bin/bash
-STRIP = 
-UDUNITS2_CPPFLAGS = -I/home/pierce/include
-UDUNITS2_LDFLAGS = -L/home/pierce/lib -ludunits2 -lexpat -L/home/pierce/lib -ludunits2
-UDUNITS2_LIBS = -ludunits2
-VERSION = 2.0.0
-X11_LIBS = -lX11 
-XAW_LIBS = -lXaw -lXt 
-XMKMF = 
-X_CFLAGS = 
-X_EXTRA_LIBS = 
-X_INCLUDES = 
-X_LIBS = 
-X_PRE_LIBS =  -lSM -lICE
-abs_builddir = /home/pierce/src/mine/ncview/ncview-2.0beta3
-abs_srcdir = /home/pierce/src/mine/ncview/ncview-2.0beta3
-abs_top_builddir = /home/pierce/src/mine/ncview/ncview-2.0beta3
-abs_top_srcdir = /home/pierce/src/mine/ncview/ncview-2.0beta3
-ac_ct_CC = cc
-am__include = include
-am__leading_dot = .
-am__quote = 
-am__tar = ${AMTAR} chof - "$$tardir"
-am__untar = ${AMTAR} xf -
-bindir = ${exec_prefix}/bin
-build_alias = 
-builddir = .
-datadir = ${datarootdir}
-datarootdir = ${prefix}/share
-docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
-dvidir = ${docdir}
-exec_prefix = ${prefix}
-host_alias = 
-htmldir = ${docdir}
-includedir = ${prefix}/include
-infodir = ${datarootdir}/info
-install_sh = $(SHELL) /home/pierce/src/mine/ncview/ncview-2.0beta3/install-sh
-libdir = ${exec_prefix}/lib
-libexecdir = ${exec_prefix}/libexec
-localedir = ${datarootdir}/locale
-localstatedir = ${prefix}/var
-mandir = ${datarootdir}/man
-mkdir_p = /bin/mkdir -p
-oldincludedir = /usr/include
-pdfdir = ${docdir}
-prefix = /home/pierce
-program_transform_name = s,x,x,
-psdir = ${docdir}
-sbindir = ${exec_prefix}/sbin
-sharedstatedir = ${prefix}/com
-srcdir = .
-sysconfdir = ${prefix}/etc
-target_alias = 
-top_builddir = .
-top_srcdir = .
-SUBDIRS = src 
-all: config.h
-	$(MAKE) $(AM_MAKEFLAGS) all-recursive
-
-.SUFFIXES:
-am--refresh:
-	@:
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
-	      cd $(srcdir) && $(AUTOMAKE) --gnu  \
-		&& exit 0; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    echo ' $(SHELL) ./config.status'; \
-	    $(SHELL) ./config.status;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
-	esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	$(SHELL) ./config.status --recheck
-
-$(top_srcdir)/configure:  $(am__configure_deps)
-	cd $(srcdir) && $(AUTOCONF)
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-	cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-
-config.h: stamp-h1
-	@if test ! -f $@; then \
-	  rm -f stamp-h1; \
-	  $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
-	else :; fi
-
-stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
-	@rm -f stamp-h1
-	cd $(top_builddir) && $(SHELL) ./config.status config.h
-$(srcdir)/config.h.in:  $(am__configure_deps) 
-	cd $(top_srcdir) && $(AUTOHEADER)
-	rm -f stamp-h1
-	touch $@
-
-distclean-hdr:
-	-rm -f config.h stamp-h1
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-#     (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
-	@failcom='exit 1'; \
-	for f in x $$MAKEFLAGS; do \
-	  case $$f in \
-	    *=* | --[!k]*);; \
-	    *k*) failcom='fail=yes';; \
-	  esac; \
-	done; \
-	dot_seen=no; \
-	target=`echo $@ | sed s/-recursive//`; \
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  echo "Making $$target in $$subdir"; \
-	  if test "$$subdir" = "."; then \
-	    dot_seen=yes; \
-	    local_target="$$target-am"; \
-	  else \
-	    local_target="$$target"; \
-	  fi; \
-	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	  || eval $$failcom; \
-	done; \
-	if test "$$dot_seen" = "no"; then \
-	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
-	fi; test -z "$$fail"
-
-$(RECURSIVE_CLEAN_TARGETS):
-	@failcom='exit 1'; \
-	for f in x $$MAKEFLAGS; do \
-	  case $$f in \
-	    *=* | --[!k]*);; \
-	    *k*) failcom='fail=yes';; \
-	  esac; \
-	done; \
-	dot_seen=no; \
-	case "$@" in \
-	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
-	  *) list='$(SUBDIRS)' ;; \
-	esac; \
-	rev=''; for subdir in $$list; do \
-	  if test "$$subdir" = "."; then :; else \
-	    rev="$$subdir $$rev"; \
-	  fi; \
-	done; \
-	rev="$$rev ."; \
-	target=`echo $@ | sed s/-recursive//`; \
-	for subdir in $$rev; do \
-	  echo "Making $$target in $$subdir"; \
-	  if test "$$subdir" = "."; then \
-	    local_target="$$target-am"; \
-	  else \
-	    local_target="$$target"; \
-	  fi; \
-	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	  || eval $$failcom; \
-	done && test -z "$$fail"
-tags-recursive:
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
-	done
-ctags-recursive:
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
-	done
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
-	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
-	  include_option=--etags-include; \
-	  empty_fix=.; \
-	else \
-	  include_option=--include; \
-	  empty_fix=; \
-	fi; \
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
-	    test ! -f $$subdir/TAGS || \
-	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
-	  fi; \
-	done; \
-	list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
-	  test -n "$$unique" || unique=$$empty_fix; \
-	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	    $$tags $$unique; \
-	fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	tags=; \
-	list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
-	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
-
-GTAGS:
-	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
-	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
-	$(am__remove_distdir)
-	test -d $(distdir) || mkdir $(distdir)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='$(DISTFILES)'; \
-	  dist_files=`for file in $$list; do echo $$file; done | \
-	  sed -e "s|^$$srcdirstrip/||;t" \
-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-	case $$dist_files in \
-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-			   sort -u` ;; \
-	esac; \
-	for file in $$dist_files; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
-	    fi; \
-	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
-	  else \
-	    test -f $(distdir)/$$file \
-	    || cp -p $$d/$$file $(distdir)/$$file \
-	    || exit 1; \
-	  fi; \
-	done
-	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
-	    test -d "$(distdir)/$$subdir" \
-	    || $(MKDIR_P) "$(distdir)/$$subdir" \
-	    || exit 1; \
-	    distdir=`$(am__cd) $(distdir) && pwd`; \
-	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
-	    (cd $$subdir && \
-	      $(MAKE) $(AM_MAKEFLAGS) \
-	        top_distdir="$$top_distdir" \
-	        distdir="$$distdir/$$subdir" \
-		am__remove_distdir=: \
-		am__skip_length_check=: \
-	        distdir) \
-	      || exit 1; \
-	  fi; \
-	done
-	-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
-	  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
-	  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
-	  ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
-	|| chmod -R a+r $(distdir)
-dist-gzip: distdir
-	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
-	$(am__remove_distdir)
-
-dist-bzip2: distdir
-	tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
-	$(am__remove_distdir)
-
-dist-lzma: distdir
-	tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
-	$(am__remove_distdir)
-
-dist-tarZ: distdir
-	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
-	$(am__remove_distdir)
-
-dist-shar: distdir
-	shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
-	$(am__remove_distdir)
-
-dist-zip: distdir
-	-rm -f $(distdir).zip
-	zip -rq $(distdir).zip $(distdir)
-	$(am__remove_distdir)
-
-dist dist-all: distdir
-	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
-	$(am__remove_distdir)
-
-# This target untars the dist file and tries a VPATH configuration.  Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
-	case '$(DIST_ARCHIVES)' in \
-	*.tar.gz*) \
-	  GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
-	*.tar.bz2*) \
-	  bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
-	*.tar.lzma*) \
-	  unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
-	*.tar.Z*) \
-	  uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
-	*.shar.gz*) \
-	  GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
-	*.zip*) \
-	  unzip $(distdir).zip ;;\
-	esac
-	chmod -R a-w $(distdir); chmod a+w $(distdir)
-	mkdir $(distdir)/_build
-	mkdir $(distdir)/_inst
-	chmod a-w $(distdir)
-	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
-	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
-	  && cd $(distdir)/_build \
-	  && ../configure --srcdir=.. --prefix="$$dc_install_base" \
-	    $(DISTCHECK_CONFIGURE_FLAGS) \
-	  && $(MAKE) $(AM_MAKEFLAGS) \
-	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
-	  && $(MAKE) $(AM_MAKEFLAGS) check \
-	  && $(MAKE) $(AM_MAKEFLAGS) install \
-	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
-	  && $(MAKE) $(AM_MAKEFLAGS) uninstall \
-	  && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
-	        distuninstallcheck \
-	  && chmod -R a-w "$$dc_install_base" \
-	  && ({ \
-	       (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
-	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
-	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
-	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
-	            distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
-	      } || { rm -rf "$$dc_destdir"; exit 1; }) \
-	  && rm -rf "$$dc_destdir" \
-	  && $(MAKE) $(AM_MAKEFLAGS) dist \
-	  && rm -rf $(DIST_ARCHIVES) \
-	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
-	$(am__remove_distdir)
-	@(echo "$(distdir) archives ready for distribution: "; \
-	  list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
-	  sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
-distuninstallcheck:
-	@cd $(distuninstallcheck_dir) \
-	&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
-	   || { echo "ERROR: files left after uninstall:" ; \
-	        if test -n "$(DESTDIR)"; then \
-	          echo "  (check DESTDIR support)"; \
-	        fi ; \
-	        $(distuninstallcheck_listfiles) ; \
-	        exit 1; } >&2
-distcleancheck: distclean
-	@if test '$(srcdir)' = . ; then \
-	  echo "ERROR: distcleancheck can only run from a VPATH build" ; \
-	  exit 1 ; \
-	fi
-	@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
-	  || { echo "ERROR: files left in build directory after distclean:" ; \
-	       $(distcleancheck_listfiles) ; \
-	       exit 1; } >&2
-check-am: all-am
-check: check-recursive
-all-am: Makefile config.h
-installdirs: installdirs-recursive
-installdirs-am:
-install: install-recursive
-install-exec: install-exec-recursive
-install-data: install-data-recursive
-uninstall: uninstall-recursive
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-recursive
-install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-recursive
-
-clean-am: clean-generic mostlyclean-am
-
-distclean: distclean-recursive
-	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-	-rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-hdr distclean-tags
-
-dvi: dvi-recursive
-
-dvi-am:
-
-html: html-recursive
-
-info: info-recursive
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-recursive
-
-install-exec-am:
-
-install-html: install-html-recursive
-
-install-info: install-info-recursive
-
-install-man:
-
-install-pdf: install-pdf-recursive
-
-install-ps: install-ps-recursive
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-recursive
-	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-	-rm -rf $(top_srcdir)/autom4te.cache
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-recursive
-
-mostlyclean-am: mostlyclean-generic
-
-pdf: pdf-recursive
-
-pdf-am:
-
-ps: ps-recursive
-
-ps-am:
-
-uninstall-am:
-
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
-	install-strip
-
-.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
-	all all-am am--refresh check check-am clean clean-generic \
-	ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
-	dist-lzma dist-shar dist-tarZ dist-zip distcheck distclean \
-	distclean-generic distclean-hdr distclean-tags distcleancheck \
-	distdir distuninstallcheck dvi dvi-am html html-am info \
-	info-am install install-am install-data install-data-am \
-	install-dvi install-dvi-am install-exec install-exec-am \
-	install-html install-html-am install-info install-info-am \
-	install-man install-pdf install-pdf-am install-ps \
-	install-ps-am install-strip installcheck installcheck-am \
-	installdirs installdirs-am maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
-	pdf-am ps ps-am tags tags-recursive uninstall uninstall-am
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/Makefile.in b/Makefile.in
index 7ec6639..55d72cc 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -36,7 +36,7 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
 	depcomp install-sh missing
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4macros/netcdf.m4 \
-	$(top_srcdir)/m4macros/ppm.m4 \
+	$(top_srcdir)/m4macros/png.m4 \
 	$(top_srcdir)/m4macros/udunits2.m4 $(top_srcdir)/configure.in
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
@@ -84,10 +84,10 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
-DO_PPM_INCDIR = @DO_PPM_INCDIR@
-DO_PPM_LIBDIR = @DO_PPM_LIBDIR@
-DO_PPM_LIBNAME = @DO_PPM_LIBNAME@
-DO_PPM_LINE = @DO_PPM_LINE@
+DO_PNG_INCDIR = @DO_PNG_INCDIR@
+DO_PNG_LIBDIR = @DO_PNG_LIBDIR@
+DO_PNG_LIBNAME = @DO_PNG_LIBNAME@
+DO_PNG_LINE = @DO_PNG_LINE@
 DO_UDUNITS2_INCDIR = @DO_UDUNITS2_INCDIR@
 DO_UDUNITS2_LIBDIR = @DO_UDUNITS2_LIBDIR@
 DO_UDUNITS2_LIBNAME = @DO_UDUNITS2_LIBNAME@
@@ -123,9 +123,9 @@ PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
-PPM_INCDIR = @PPM_INCDIR@
-PPM_LIBDIR = @PPM_LIBDIR@
-PPM_LIBNAME = @PPM_LIBNAME@
+PNG_CPPFLAGS = @PNG_CPPFLAGS@
+PNG_LDFLAGS = @PNG_LDFLAGS@
+PNG_LIBS = @PNG_LIBS@
 PREFIX = @PREFIX@
 RPATH_FLAGS = @RPATH_FLAGS@
 SET_MAKE = @SET_MAKE@
diff --git a/README_LOCAL b/README_LOCAL
new file mode 100644
index 0000000..ee110c2
--- /dev/null
+++ b/README_LOCAL
@@ -0,0 +1,4 @@
+##./configure --prefix=$HOME --with-udunits2_incdir=/home/pierce/src/packages/data/udunits/udunits-2.1.23/install/include --with-udunits2_libdir=/home/pierce/src/packages/data/udunits/udunits-2.1.23/install/lib
+
+./configure --prefix=$HOME --with-udunits2_incdir=/home/pierce/src/packages/data/udunits/udunits-2.1.11/install/include --with-udunits2_libdir=/home/pierce/src/packages/data/udunits/udunits-2.1.11/install/lib
+
diff --git a/aclocal.m4 b/aclocal.m4
index 8bad7dc..f3abd1b 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -867,5 +867,5 @@ AC_SUBST([am__untar])
 ]) # _AM_PROG_TAR
 
 m4_include([m4macros/netcdf.m4])
-m4_include([m4macros/ppm.m4])
+m4_include([m4macros/png.m4])
 m4_include([m4macros/udunits2.m4])
diff --git a/autom4te.cache/output.0 b/autom4te.cache/output.0
index efebf0a..018887e 100644
--- a/autom4te.cache/output.0
+++ b/autom4te.cache/output.0
@@ -712,13 +712,13 @@ DO_UDUNITS2_LINE
 DO_UDUNITS2_INCDIR
 DO_UDUNITS2_LIBDIR
 DO_UDUNITS2_LIBNAME
-PPM_INCDIR
-PPM_LIBDIR
-PPM_LIBNAME
-DO_PPM_LINE
-DO_PPM_INCDIR
-DO_PPM_LIBDIR
-DO_PPM_LIBNAME
+PNG_CPPFLAGS
+PNG_LDFLAGS
+PNG_LIBS
+DO_PNG_LINE
+DO_PNG_INCDIR
+DO_PNG_LIBDIR
+DO_PNG_LIBNAME
 PREFIX
 X_INCLUDES
 RPATH_FLAGS
@@ -1324,8 +1324,8 @@ Optional Packages:
   --with-x                use the X Window System
   --with-udunits2_incdir=dir directory containing udunits2 includes
   --with-udunits2_libdir=dir directory containing udunits2 library
-  --with-ppm_incdir=dir directory containing ppm includes
-  --with-ppm_libdir=dir directory containing ppm library
+  --with-png_incdir=dir directory containing png includes
+  --with-png_libdir=dir directory containing png library
 
 Some influential environment variables:
   CC          C compiler command
@@ -5430,6 +5430,8 @@ fi
 
 if test x"$haveAthena"x = "xnox"; then
 	haveAthena=yes
+	{ echo "$as_me:$LINENO: checking for the Athena 3d widgets instead" >&5
+echo $ECHO_N "checking for the Athena 3d widgets instead... $ECHO_C" >&6; }
 	
 { echo "$as_me:$LINENO: checking for XawScrollbarSetThumb in -lXaw3d" >&5
 echo $ECHO_N "checking for XawScrollbarSetThumb in -lXaw3d... $ECHO_C" >&6; }
@@ -5848,14 +5850,71 @@ fi
 
 
 if test x"$haveAthena"x != "xyesx"; then
-  { { echo "$as_me:$LINENO: error: Could not find Athena widgets library and header.  Use your package manager to install the X windows development libraries and headers." >&5
-echo "$as_me: error: Could not find Athena widgets library and header.  Use your package manager to install the X windows development libraries and headers." >&2;}
+  # On AIX this fails because the Xmu header needs to be there as well...
+  { echo "$as_me:$LINENO: checking for X11/Xaw/Simple.h" >&5
+echo $ECHO_N "checking for X11/Xaw/Simple.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_X11_Xaw_Simple_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include<X11/Xmu/Xmu.h>
+
+
+@%:@include <X11/Xaw/Simple.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_header_X11_Xaw_Simple_h=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_header_X11_Xaw_Simple_h=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xaw_Simple_h" >&5
+echo "${ECHO_T}$ac_cv_header_X11_Xaw_Simple_h" >&6; }
+if test $ac_cv_header_X11_Xaw_Simple_h = yes; then
+  :
+else
+  haveAthena=no
+fi
+
+
+  if test x"$haveAthena"x != "xyesx"; then
+    { { echo "$as_me:$LINENO: error: Could not find Athena widgets library and header (checked w/Xmu.h included as well).  Use your package manager to install the X windows development libraries and headers." >&5
+echo "$as_me: error: Could not find Athena widgets library and header (checked w/Xmu.h included as well).  Use your package manager to install the X windows development libraries and headers." >&2;}
    { (exit 1); exit 1; }; }
+  fi
 fi
 XAW_LIBS=$LIBS
 echo "X Athena widget (Xaw) libraries: $XAW_LIBS"
 
 LIBS=$LIBSsave
+CFLAGS=$CFLAGSsave
 
 #------------------------------------------------------------------------------
 # Check for X11 library. It's not clear to me why this is necessary, yet Darwin 
@@ -5952,6 +6011,7 @@ X11_LIBS=$LIBS
 echo "X11 libraries: $X11_LIBS"
 
 LIBS=$LIBSsave
+CFLAGS=$CFLAGSsave
 
 # Handle udunits2
 
@@ -6945,8 +7005,12 @@ fi
 
 
 fi
+UDUNITS2_INC_PRESENT=no
 if test x$UDUNITS2_INCDIR != x; then
+	UDUNITS2_INC_PRESENT=yes
         UDUNITS2_CPPFLAGS=-I$UDUNITS2_INCDIR
+else
+	echo "** Could not find the udunits2.h file, udunits support will not be included **"
 fi
 UDUNITS2_LIBNAME=libudunits2.a
 
@@ -7181,15 +7245,17 @@ fi
 fi
 UDUNITS2_LIBNAME=`echo $UDUNITS2_LIBNAME | sed s/lib// | sed s/\.a//`
 UDUNITS2_PRESENT=no
-if test x$UDUNITS2_LIBDIR != x; then
-	UDUNITS2_PRESENT=yes
-	UDUNITS2_LIBS=-l$UDUNITS2_LIBNAME
-        UDUNITS2_LDFLAGS="-L$UDUNITS2_LIBDIR $UDUNITS2_LIBS"
-	
+if test $UDUNITS2_INC_PRESENT = yes; then
+	if test x$UDUNITS2_LIBDIR != x; then
+		UDUNITS2_PRESENT=yes
+		UDUNITS2_LIBS=-l$UDUNITS2_LIBNAME
+		UDUNITS2_LDFLAGS="-L$UDUNITS2_LIBDIR $UDUNITS2_LIBS"
+		
 cat >>confdefs.h <<\_ACEOF
 @%:@define HAVE_UDUNITS2 1
 _ACEOF
 
+	fi
 fi
 if test $UDUNITS2_PRESENT = yes; then
 	haveExpat=yes
@@ -7283,6 +7349,7 @@ echo "$as_me: error: Could not find the expat library despite the fact that the
 	echo "Expat libraries (needed by udunits2): $EXPAT_LIBS"
 	UDUNITS2_LDFLAGS="$UDUNITS2_LDFLAGS $LIBS"
 	LIBS=$LIBSsave
+	CFLAGS=$CFLAGSsave
 fi
 
 
@@ -7326,20 +7393,20 @@ fi
 
 
 
-# Handle ppm
+# Handle png
 
 
-# Check whether --with-ppm_incdir was given.
-if test "${with_ppm_incdir+set}" = set; then
-  withval=$with_ppm_incdir; PPM_INCDIR=$withval
+# Check whether --with-png_incdir was given.
+if test "${with_png_incdir+set}" = set; then
+  withval=$with_png_incdir; PNG_INCDIR=$withval
 fi
 
 err=0
-if test x$PPM_INCDIR != x; then
-        as_ac_Header=`echo "ac_cv_header_$PPM_INCDIR/ppm.h" | $as_tr_sh`
+if test x$PNG_INCDIR != x; then
+        as_ac_Header=`echo "ac_cv_header_$PNG_INCDIR/png.h" | $as_tr_sh`
 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { echo "$as_me:$LINENO: checking for $PPM_INCDIR/ppm.h" >&5
-echo $ECHO_N "checking for $PPM_INCDIR/ppm.h... $ECHO_C" >&6; }
+  { echo "$as_me:$LINENO: checking for $PNG_INCDIR/png.h" >&5
+echo $ECHO_N "checking for $PNG_INCDIR/png.h... $ECHO_C" >&6; }
 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
@@ -7348,8 +7415,8 @@ ac_res=`eval echo '${'$as_ac_Header'}'`
 echo "${ECHO_T}$ac_res" >&6; }
 else
   # Is the header compilable?
-{ echo "$as_me:$LINENO: checking $PPM_INCDIR/ppm.h usability" >&5
-echo $ECHO_N "checking $PPM_INCDIR/ppm.h usability... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking $PNG_INCDIR/png.h usability" >&5
+echo $ECHO_N "checking $PNG_INCDIR/png.h usability... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -7357,7 +7424,7 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-@%:@include <$PPM_INCDIR/ppm.h>
+@%:@include <$PNG_INCDIR/png.h>
 _ACEOF
 rm -f conftest.$ac_objext
 if { (ac_try="$ac_compile"
@@ -7389,15 +7456,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 echo "${ECHO_T}$ac_header_compiler" >&6; }
 
 # Is the header present?
-{ echo "$as_me:$LINENO: checking $PPM_INCDIR/ppm.h presence" >&5
-echo $ECHO_N "checking $PPM_INCDIR/ppm.h presence... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking $PNG_INCDIR/png.h presence" >&5
+echo $ECHO_N "checking $PNG_INCDIR/png.h presence... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-@%:@include <$PPM_INCDIR/ppm.h>
+@%:@include <$PNG_INCDIR/png.h>
 _ACEOF
 if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
@@ -7430,25 +7497,25 @@ echo "${ECHO_T}$ac_header_preproc" >&6; }
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
   yes:no: )
-    { echo "$as_me:$LINENO: WARNING: $PPM_INCDIR/ppm.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $PPM_INCDIR/ppm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $PPM_INCDIR/ppm.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $PPM_INCDIR/ppm.h: proceeding with the compiler's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $PNG_INCDIR/png.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $PNG_INCDIR/png.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $PNG_INCDIR/png.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $PNG_INCDIR/png.h: proceeding with the compiler's result" >&2;}
     ac_header_preproc=yes
     ;;
   no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: $PPM_INCDIR/ppm.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $PPM_INCDIR/ppm.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $PPM_INCDIR/ppm.h:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $PPM_INCDIR/ppm.h:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $PPM_INCDIR/ppm.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $PPM_INCDIR/ppm.h: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $PPM_INCDIR/ppm.h:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $PPM_INCDIR/ppm.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $PPM_INCDIR/ppm.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $PPM_INCDIR/ppm.h: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $PPM_INCDIR/ppm.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $PPM_INCDIR/ppm.h: in the future, the compiler will take precedence" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $PNG_INCDIR/png.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $PNG_INCDIR/png.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $PNG_INCDIR/png.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $PNG_INCDIR/png.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $PNG_INCDIR/png.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $PNG_INCDIR/png.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $PNG_INCDIR/png.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $PNG_INCDIR/png.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $PNG_INCDIR/png.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $PNG_INCDIR/png.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $PNG_INCDIR/png.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $PNG_INCDIR/png.h: in the future, the compiler will take precedence" >&2;}
     ( cat <<\_ASBOX
 @%:@@%:@ ------------------------------- @%:@@%:@
 @%:@@%:@ Report this to dpierce at ucsd.edu @%:@@%:@
@@ -7457,8 +7524,8 @@ _ASBOX
      ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
-{ echo "$as_me:$LINENO: checking for $PPM_INCDIR/ppm.h" >&5
-echo $ECHO_N "checking for $PPM_INCDIR/ppm.h... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking for $PNG_INCDIR/png.h" >&5
+echo $ECHO_N "checking for $PNG_INCDIR/png.h... $ECHO_C" >&6; }
 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -7470,30 +7537,38 @@ echo "${ECHO_T}$ac_res" >&6; }
 
 fi
 if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  echo "Using user-specified ppm include dir=$PPM_INCDIR"
+  echo "Using user-specified png include dir=$PNG_INCDIR"
 else
   err=1 
 fi
 
 
+	if test $err -eq 1; then
+		echo "--------------------------------------------------------------------------------"
+		echo "Error: You specified that the pnginclude directory is $PNG_INCDIR"
+		echo "but that directory does NOT have required png include file png.h."
+		echo "You must specify a directory that has the png include files"
+		echo "--------------------------------------------------------------------------------"
+		exit -1
+	fi
 fi
 if test $err -eq 1; then
-        echo "Error: user specified ppm include directory does not have ppm.h!"
+        echo "Error: user specified png include directory does not have png.h!"
         exit -1
 fi
-if test x$PPM_INCDIR = x; then
-        if test "${ac_cv_header__usr_local_include_ppm_h+set}" = set; then
-  { echo "$as_me:$LINENO: checking for /usr/local/include/ppm.h" >&5
-echo $ECHO_N "checking for /usr/local/include/ppm.h... $ECHO_C" >&6; }
-if test "${ac_cv_header__usr_local_include_ppm_h+set}" = set; then
+if test x$PNG_INCDIR = x; then
+        if test "${ac_cv_header_png_h+set}" = set; then
+  { echo "$as_me:$LINENO: checking for png.h" >&5
+echo $ECHO_N "checking for png.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_png_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header__usr_local_include_ppm_h" >&5
-echo "${ECHO_T}$ac_cv_header__usr_local_include_ppm_h" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_header_png_h" >&5
+echo "${ECHO_T}$ac_cv_header_png_h" >&6; }
 else
   # Is the header compilable?
-{ echo "$as_me:$LINENO: checking /usr/local/include/ppm.h usability" >&5
-echo $ECHO_N "checking /usr/local/include/ppm.h usability... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking png.h usability" >&5
+echo $ECHO_N "checking png.h usability... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -7501,7 +7576,7 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-@%:@include </usr/local/include/ppm.h>
+@%:@include <png.h>
 _ACEOF
 rm -f conftest.$ac_objext
 if { (ac_try="$ac_compile"
@@ -7533,15 +7608,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 echo "${ECHO_T}$ac_header_compiler" >&6; }
 
 # Is the header present?
-{ echo "$as_me:$LINENO: checking /usr/local/include/ppm.h presence" >&5
-echo $ECHO_N "checking /usr/local/include/ppm.h presence... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking png.h presence" >&5
+echo $ECHO_N "checking png.h presence... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-@%:@include </usr/local/include/ppm.h>
+@%:@include <png.h>
 _ACEOF
 if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
@@ -7574,25 +7649,25 @@ echo "${ECHO_T}$ac_header_preproc" >&6; }
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
   yes:no: )
-    { echo "$as_me:$LINENO: WARNING: /usr/local/include/ppm.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: /usr/local/include/ppm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: /usr/local/include/ppm.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: /usr/local/include/ppm.h: proceeding with the compiler's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: png.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: png.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: png.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: png.h: proceeding with the compiler's result" >&2;}
     ac_header_preproc=yes
     ;;
   no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: /usr/local/include/ppm.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: /usr/local/include/ppm.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: /usr/local/include/ppm.h:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: /usr/local/include/ppm.h:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: /usr/local/include/ppm.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: /usr/local/include/ppm.h: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: /usr/local/include/ppm.h:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: /usr/local/include/ppm.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: /usr/local/include/ppm.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: /usr/local/include/ppm.h: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: /usr/local/include/ppm.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: /usr/local/include/ppm.h: in the future, the compiler will take precedence" >&2;}
+    { echo "$as_me:$LINENO: WARNING: png.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: png.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: png.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: png.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: png.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: png.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: png.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: png.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: png.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: png.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: png.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: png.h: in the future, the compiler will take precedence" >&2;}
     ( cat <<\_ASBOX
 @%:@@%:@ ------------------------------- @%:@@%:@
 @%:@@%:@ Report this to dpierce at ucsd.edu @%:@@%:@
@@ -7601,36 +7676,36 @@ _ASBOX
      ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
-{ echo "$as_me:$LINENO: checking for /usr/local/include/ppm.h" >&5
-echo $ECHO_N "checking for /usr/local/include/ppm.h... $ECHO_C" >&6; }
-if test "${ac_cv_header__usr_local_include_ppm_h+set}" = set; then
+{ echo "$as_me:$LINENO: checking for png.h" >&5
+echo $ECHO_N "checking for png.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_png_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_cv_header__usr_local_include_ppm_h=$ac_header_preproc
+  ac_cv_header_png_h=$ac_header_preproc
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header__usr_local_include_ppm_h" >&5
-echo "${ECHO_T}$ac_cv_header__usr_local_include_ppm_h" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_header_png_h" >&5
+echo "${ECHO_T}$ac_cv_header_png_h" >&6; }
 
 fi
-if test $ac_cv_header__usr_local_include_ppm_h = yes; then
-  PPM_INCDIR=/usr/local/include 
+if test $ac_cv_header_png_h = yes; then
+  PNG_INCDIR=. 
 fi
 
 
 fi
-if test x$PPM_INCDIR = x; then
-        if test "${ac_cv_header__usr_include_ppm_h+set}" = set; then
-  { echo "$as_me:$LINENO: checking for /usr/include/ppm.h" >&5
-echo $ECHO_N "checking for /usr/include/ppm.h... $ECHO_C" >&6; }
-if test "${ac_cv_header__usr_include_ppm_h+set}" = set; then
+if test x$PNG_INCDIR = x; then
+        if test "${ac_cv_header__usr_local_include_png_h+set}" = set; then
+  { echo "$as_me:$LINENO: checking for /usr/local/include/png.h" >&5
+echo $ECHO_N "checking for /usr/local/include/png.h... $ECHO_C" >&6; }
+if test "${ac_cv_header__usr_local_include_png_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header__usr_include_ppm_h" >&5
-echo "${ECHO_T}$ac_cv_header__usr_include_ppm_h" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_header__usr_local_include_png_h" >&5
+echo "${ECHO_T}$ac_cv_header__usr_local_include_png_h" >&6; }
 else
   # Is the header compilable?
-{ echo "$as_me:$LINENO: checking /usr/include/ppm.h usability" >&5
-echo $ECHO_N "checking /usr/include/ppm.h usability... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking /usr/local/include/png.h usability" >&5
+echo $ECHO_N "checking /usr/local/include/png.h usability... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -7638,7 +7713,7 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-@%:@include </usr/include/ppm.h>
+@%:@include </usr/local/include/png.h>
 _ACEOF
 rm -f conftest.$ac_objext
 if { (ac_try="$ac_compile"
@@ -7670,15 +7745,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 echo "${ECHO_T}$ac_header_compiler" >&6; }
 
 # Is the header present?
-{ echo "$as_me:$LINENO: checking /usr/include/ppm.h presence" >&5
-echo $ECHO_N "checking /usr/include/ppm.h presence... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking /usr/local/include/png.h presence" >&5
+echo $ECHO_N "checking /usr/local/include/png.h presence... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-@%:@include </usr/include/ppm.h>
+@%:@include </usr/local/include/png.h>
 _ACEOF
 if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
@@ -7711,25 +7786,25 @@ echo "${ECHO_T}$ac_header_preproc" >&6; }
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
   yes:no: )
-    { echo "$as_me:$LINENO: WARNING: /usr/include/ppm.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: /usr/include/ppm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: /usr/include/ppm.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: /usr/include/ppm.h: proceeding with the compiler's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/local/include/png.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: /usr/local/include/png.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/local/include/png.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: /usr/local/include/png.h: proceeding with the compiler's result" >&2;}
     ac_header_preproc=yes
     ;;
   no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: /usr/include/ppm.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: /usr/include/ppm.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: /usr/include/ppm.h:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: /usr/include/ppm.h:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: /usr/include/ppm.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: /usr/include/ppm.h: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: /usr/include/ppm.h:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: /usr/include/ppm.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: /usr/include/ppm.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: /usr/include/ppm.h: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: /usr/include/ppm.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: /usr/include/ppm.h: in the future, the compiler will take precedence" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/local/include/png.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: /usr/local/include/png.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/local/include/png.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: /usr/local/include/png.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/local/include/png.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: /usr/local/include/png.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/local/include/png.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: /usr/local/include/png.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/local/include/png.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: /usr/local/include/png.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/local/include/png.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: /usr/local/include/png.h: in the future, the compiler will take precedence" >&2;}
     ( cat <<\_ASBOX
 @%:@@%:@ ------------------------------- @%:@@%:@
 @%:@@%:@ Report this to dpierce at ucsd.edu @%:@@%:@
@@ -7738,38 +7813,36 @@ _ASBOX
      ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
-{ echo "$as_me:$LINENO: checking for /usr/include/ppm.h" >&5
-echo $ECHO_N "checking for /usr/include/ppm.h... $ECHO_C" >&6; }
-if test "${ac_cv_header__usr_include_ppm_h+set}" = set; then
+{ echo "$as_me:$LINENO: checking for /usr/local/include/png.h" >&5
+echo $ECHO_N "checking for /usr/local/include/png.h... $ECHO_C" >&6; }
+if test "${ac_cv_header__usr_local_include_png_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_cv_header__usr_include_ppm_h=$ac_header_preproc
+  ac_cv_header__usr_local_include_png_h=$ac_header_preproc
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header__usr_include_ppm_h" >&5
-echo "${ECHO_T}$ac_cv_header__usr_include_ppm_h" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_header__usr_local_include_png_h" >&5
+echo "${ECHO_T}$ac_cv_header__usr_local_include_png_h" >&6; }
 
 fi
-if test $ac_cv_header__usr_include_ppm_h = yes; then
-  PPM_INCDIR=/usr/include 
+if test $ac_cv_header__usr_local_include_png_h = yes; then
+  PNG_INCDIR=/usr/local/include 
 fi
 
 
 fi
-if test x$PPM_INCDIR = x; then
-        as_ac_Header=`echo "ac_cv_header_$HOME/include/ppm.h" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { echo "$as_me:$LINENO: checking for $HOME/include/ppm.h" >&5
-echo $ECHO_N "checking for $HOME/include/ppm.h... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+if test x$PNG_INCDIR = x; then
+        if test "${ac_cv_header__usr_include_png_h+set}" = set; then
+  { echo "$as_me:$LINENO: checking for /usr/include/png.h" >&5
+echo $ECHO_N "checking for /usr/include/png.h... $ECHO_C" >&6; }
+if test "${ac_cv_header__usr_include_png_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_header__usr_include_png_h" >&5
+echo "${ECHO_T}$ac_cv_header__usr_include_png_h" >&6; }
 else
   # Is the header compilable?
-{ echo "$as_me:$LINENO: checking $HOME/include/ppm.h usability" >&5
-echo $ECHO_N "checking $HOME/include/ppm.h usability... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking /usr/include/png.h usability" >&5
+echo $ECHO_N "checking /usr/include/png.h usability... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -7777,7 +7850,7 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-@%:@include <$HOME/include/ppm.h>
+@%:@include </usr/include/png.h>
 _ACEOF
 rm -f conftest.$ac_objext
 if { (ac_try="$ac_compile"
@@ -7809,15 +7882,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 echo "${ECHO_T}$ac_header_compiler" >&6; }
 
 # Is the header present?
-{ echo "$as_me:$LINENO: checking $HOME/include/ppm.h presence" >&5
-echo $ECHO_N "checking $HOME/include/ppm.h presence... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking /usr/include/png.h presence" >&5
+echo $ECHO_N "checking /usr/include/png.h presence... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-@%:@include <$HOME/include/ppm.h>
+@%:@include </usr/include/png.h>
 _ACEOF
 if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
@@ -7850,25 +7923,25 @@ echo "${ECHO_T}$ac_header_preproc" >&6; }
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
   yes:no: )
-    { echo "$as_me:$LINENO: WARNING: $HOME/include/ppm.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $HOME/include/ppm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $HOME/include/ppm.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $HOME/include/ppm.h: proceeding with the compiler's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/include/png.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: /usr/include/png.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/include/png.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: /usr/include/png.h: proceeding with the compiler's result" >&2;}
     ac_header_preproc=yes
     ;;
   no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: $HOME/include/ppm.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $HOME/include/ppm.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $HOME/include/ppm.h:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $HOME/include/ppm.h:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $HOME/include/ppm.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $HOME/include/ppm.h: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $HOME/include/ppm.h:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $HOME/include/ppm.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $HOME/include/ppm.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $HOME/include/ppm.h: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $HOME/include/ppm.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $HOME/include/ppm.h: in the future, the compiler will take precedence" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/include/png.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: /usr/include/png.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/include/png.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: /usr/include/png.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/include/png.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: /usr/include/png.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/include/png.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: /usr/include/png.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/include/png.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: /usr/include/png.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/include/png.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: /usr/include/png.h: in the future, the compiler will take precedence" >&2;}
     ( cat <<\_ASBOX
 @%:@@%:@ ------------------------------- @%:@@%:@
 @%:@@%:@ Report this to dpierce at ucsd.edu @%:@@%:@
@@ -7877,101 +7950,193 @@ _ASBOX
      ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
-{ echo "$as_me:$LINENO: checking for $HOME/include/ppm.h" >&5
-echo $ECHO_N "checking for $HOME/include/ppm.h... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+{ echo "$as_me:$LINENO: checking for /usr/include/png.h" >&5
+echo $ECHO_N "checking for /usr/include/png.h... $ECHO_C" >&6; }
+if test "${ac_cv_header__usr_include_png_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  eval "$as_ac_Header=\$ac_header_preproc"
+  ac_cv_header__usr_include_png_h=$ac_header_preproc
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header__usr_include_png_h" >&5
+echo "${ECHO_T}$ac_cv_header__usr_include_png_h" >&6; }
+
+fi
+if test $ac_cv_header__usr_include_png_h = yes; then
+  PNG_INCDIR=/usr/include 
+fi
+
+
+fi
+if test x$PNG_INCDIR = x; then
+        as_ac_Header=`echo "ac_cv_header_$HOME/include/png.h" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $HOME/include/png.h" >&5
+echo $ECHO_N "checking for $HOME/include/png.h... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
 ac_res=`eval echo '${'$as_ac_Header'}'`
 	       { echo "$as_me:$LINENO: result: $ac_res" >&5
 echo "${ECHO_T}$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $HOME/include/png.h usability" >&5
+echo $ECHO_N "checking $HOME/include/png.h usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+@%:@include <$HOME/include/png.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  PPM_INCDIR=$HOME/include 
+	ac_header_compiler=no
 fi
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
 
-fi
-PPM_LIBNAME=libppm.so
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $HOME/include/png.h presence" >&5
+echo $ECHO_N "checking $HOME/include/png.h presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+@%:@include <$HOME/include/png.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-# Check whether --with-ppm_libdir was given.
-if test "${with_ppm_libdir+set}" = set; then
-  withval=$with_ppm_libdir; PPM_LIBDIR=$withval
+  ac_header_preproc=no
 fi
 
-err=0
-if test x$PPM_LIBDIR != x; then
-        as_ac_File=`echo "ac_cv_file_$PPM_LIBDIR/$PPM_LIBNAME" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $PPM_LIBDIR/$PPM_LIBNAME" >&5
-echo $ECHO_N "checking for $PPM_LIBDIR/$PPM_LIBNAME... $ECHO_C" >&6; }
-if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $HOME/include/png.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $HOME/include/png.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $HOME/include/png.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $HOME/include/png.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $HOME/include/png.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $HOME/include/png.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $HOME/include/png.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $HOME/include/png.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $HOME/include/png.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $HOME/include/png.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $HOME/include/png.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $HOME/include/png.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $HOME/include/png.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $HOME/include/png.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $HOME/include/png.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $HOME/include/png.h: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+@%:@@%:@ ------------------------------- @%:@@%:@
+@%:@@%:@ Report this to dpierce at ucsd.edu @%:@@%:@
+@%:@@%:@ ------------------------------- @%:@@%:@
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for $HOME/include/png.h" >&5
+echo $ECHO_N "checking for $HOME/include/png.h... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  test "$cross_compiling" = yes &&
-  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
-echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
-   { (exit 1); exit 1; }; }
-if test -r "$PPM_LIBDIR/$PPM_LIBNAME"; then
-  eval "$as_ac_File=yes"
-else
-  eval "$as_ac_File=no"
-fi
+  eval "$as_ac_Header=\$ac_header_preproc"
 fi
-ac_res=`eval echo '${'$as_ac_File'}'`
+ac_res=`eval echo '${'$as_ac_Header'}'`
 	       { echo "$as_me:$LINENO: result: $ac_res" >&5
 echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_File'}'` = yes; then
-  echo "Using user-specified ppm library dir=$PPM_LIBDIR"
-else
-  err=1 
-fi
 
 fi
-if test $err -eq 1; then
-        echo "Error: user specified ppm library directory does not have $PPM_LIBNAME !"
-        exit -1
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  PNG_INCDIR=$HOME/include 
 fi
-if test x$PPM_LIBDIR = x; then
-	{ echo "$as_me:$LINENO: checking for ppm_writeppm in -lppm" >&5
-echo $ECHO_N "checking for ppm_writeppm in -lppm... $ECHO_C" >&6; }
-if test "${ac_cv_lib_ppm_ppm_writeppm+set}" = set; then
+
+
+fi
+if test x$PNG_INCDIR = x; then
+        if test "${ac_cv_header__sw_include_png_h+set}" = set; then
+  { echo "$as_me:$LINENO: checking for /sw/include/png.h" >&5
+echo $ECHO_N "checking for /sw/include/png.h... $ECHO_C" >&6; }
+if test "${ac_cv_header__sw_include_png_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header__sw_include_png_h" >&5
+echo "${ECHO_T}$ac_cv_header__sw_include_png_h" >&6; }
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lppm  $LIBS"
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking /sw/include/png.h usability" >&5
+echo $ECHO_N "checking /sw/include/png.h usability... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char ppm_writeppm ();
-int
-main ()
-{
-return ppm_writeppm ();
-  ;
-  return 0;
-}
+$ac_includes_default
+@%:@include </sw/include/png.h>
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -7980,106 +8145,125 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_ppm_ppm_writeppm=yes
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	ac_cv_lib_ppm_ppm_writeppm=no
+	ac_header_compiler=no
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_ppm_ppm_writeppm" >&5
-echo "${ECHO_T}$ac_cv_lib_ppm_ppm_writeppm" >&6; }
-if test $ac_cv_lib_ppm_ppm_writeppm = yes; then
-  PPM_LIBDIR=. 
-fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
 
-fi
-if test x$PPM_LIBDIR = x; then
-        as_ac_File=`echo "ac_cv_file_/usr/local/lib/$PPM_LIBNAME" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for /usr/local/lib/$PPM_LIBNAME" >&5
-echo $ECHO_N "checking for /usr/local/lib/$PPM_LIBNAME... $ECHO_C" >&6; }
-if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  test "$cross_compiling" = yes &&
-  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
-echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
-   { (exit 1); exit 1; }; }
-if test -r "/usr/local/lib/$PPM_LIBNAME"; then
-  eval "$as_ac_File=yes"
+# Is the header present?
+{ echo "$as_me:$LINENO: checking /sw/include/png.h presence" >&5
+echo $ECHO_N "checking /sw/include/png.h presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+@%:@include </sw/include/png.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
 else
-  eval "$as_ac_File=no"
-fi
-fi
-ac_res=`eval echo '${'$as_ac_File'}'`
-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_File'}'` = yes; then
-  PPM_LIBDIR=/usr/local/lib 
-fi
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+  ac_header_preproc=no
 fi
-if test x$PPM_LIBDIR = x; then
-        as_ac_File=`echo "ac_cv_file_/usr/lib/$PPM_LIBNAME" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for /usr/lib/$PPM_LIBNAME" >&5
-echo $ECHO_N "checking for /usr/lib/$PPM_LIBNAME... $ECHO_C" >&6; }
-if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: /sw/include/png.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: /sw/include/png.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /sw/include/png.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: /sw/include/png.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: /sw/include/png.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: /sw/include/png.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /sw/include/png.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: /sw/include/png.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /sw/include/png.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: /sw/include/png.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /sw/include/png.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: /sw/include/png.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /sw/include/png.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: /sw/include/png.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /sw/include/png.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: /sw/include/png.h: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+@%:@@%:@ ------------------------------- @%:@@%:@
+@%:@@%:@ Report this to dpierce at ucsd.edu @%:@@%:@
+@%:@@%:@ ------------------------------- @%:@@%:@
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for /sw/include/png.h" >&5
+echo $ECHO_N "checking for /sw/include/png.h... $ECHO_C" >&6; }
+if test "${ac_cv_header__sw_include_png_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  test "$cross_compiling" = yes &&
-  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
-echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
-   { (exit 1); exit 1; }; }
-if test -r "/usr/lib/$PPM_LIBNAME"; then
-  eval "$as_ac_File=yes"
-else
-  eval "$as_ac_File=no"
+  ac_cv_header__sw_include_png_h=$ac_header_preproc
 fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header__sw_include_png_h" >&5
+echo "${ECHO_T}$ac_cv_header__sw_include_png_h" >&6; }
+
 fi
-ac_res=`eval echo '${'$as_ac_File'}'`
-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_File'}'` = yes; then
-  PPM_LIBDIR=/usr/lib 
+if test $ac_cv_header__sw_include_png_h = yes; then
+  PNG_INCDIR=/sw/include 
 fi
 
+
 fi
-if test x$PPM_LIBDIR = x; then
-        as_ac_File=`echo "ac_cv_file_/lib/$PPM_LIBNAME" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for /lib/$PPM_LIBNAME" >&5
-echo $ECHO_N "checking for /lib/$PPM_LIBNAME... $ECHO_C" >&6; }
-if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+PNG_INC_PRESENT=no
+if test x$PNG_INCDIR != x; then
+	PNG_INC_PRESENT=yes
+        PNG_CPPFLAGS=-I$PNG_INCDIR
 else
-  test "$cross_compiling" = yes &&
-  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
-echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
-   { (exit 1); exit 1; }; }
-if test -r "/lib/$PPM_LIBNAME"; then
-  eval "$as_ac_File=yes"
-else
-  eval "$as_ac_File=no"
-fi
-fi
-ac_res=`eval echo '${'$as_ac_File'}'`
-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_File'}'` = yes; then
-  PPM_LIBDIR=/lib 
+	echo "** Could not find the png.h file, so -frames support will not be included  **"
+	echo "** Install the PNG library (and development headers) to fix this           **"
 fi
+PNG_LIBNAME=libpng.so
 
+# Check whether --with-png_libdir was given.
+if test "${with_png_libdir+set}" = set; then
+  withval=$with_png_libdir; PNG_LIBDIR=$withval
 fi
-if test x$PPM_LIBDIR = x; then
-        as_ac_File=`echo "ac_cv_file_$HOME/lib/$PPM_LIBNAME" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $HOME/lib/$PPM_LIBNAME" >&5
-echo $ECHO_N "checking for $HOME/lib/$PPM_LIBNAME... $ECHO_C" >&6; }
+
+err=0
+if test x$PNG_LIBDIR != x; then
+        as_ac_File=`echo "ac_cv_file_$PNG_LIBDIR/$PNG_LIBNAME" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $PNG_LIBDIR/$PNG_LIBNAME" >&5
+echo $ECHO_N "checking for $PNG_LIBDIR/$PNG_LIBNAME... $ECHO_C" >&6; }
 if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -8087,7 +8271,7 @@ else
   { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
 echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
    { (exit 1); exit 1; }; }
-if test -r "$HOME/lib/$PPM_LIBNAME"; then
+if test -r "$PNG_LIBDIR/$PNG_LIBNAME"; then
   eval "$as_ac_File=yes"
 else
   eval "$as_ac_File=no"
@@ -8097,20 +8281,24 @@ ac_res=`eval echo '${'$as_ac_File'}'`
 	       { echo "$as_me:$LINENO: result: $ac_res" >&5
 echo "${ECHO_T}$ac_res" >&6; }
 if test `eval echo '${'$as_ac_File'}'` = yes; then
-  PPM_LIBDIR=$HOME/lib 
+  echo "Using user-specified png library dir=$PNG_LIBDIR"
+else
+  err=1 
 fi
 
 fi
-if test x$PPM_LIBDIR = x; then
-PPM_LIBNAME=libnetpbm.so
-if test x$PPM_LIBDIR = x; then
-	{ echo "$as_me:$LINENO: checking for ppm_writeppm in -lnetpbm" >&5
-echo $ECHO_N "checking for ppm_writeppm in -lnetpbm... $ECHO_C" >&6; }
-if test "${ac_cv_lib_netpbm_ppm_writeppm+set}" = set; then
+if test $err -eq 1; then
+        echo "Error: user specified png library directory does not have $PNG_LIBNAME !"
+        exit -1
+fi
+if test x$PNG_LIBDIR = x; then
+        { echo "$as_me:$LINENO: checking for png_write_png in -lpng" >&5
+echo $ECHO_N "checking for png_write_png in -lpng... $ECHO_C" >&6; }
+if test "${ac_cv_lib_png_png_write_png+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lnetpbm  $LIBS"
+LIBS="-lpng  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -8124,11 +8312,11 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
-char ppm_writeppm ();
+char png_write_png ();
 int
 main ()
 {
-return ppm_writeppm ();
+return png_write_png ();
   ;
   return 0;
 }
@@ -8151,29 +8339,54 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 	 test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_netpbm_ppm_writeppm=yes
+  ac_cv_lib_png_png_write_png=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	ac_cv_lib_netpbm_ppm_writeppm=no
+	ac_cv_lib_png_png_write_png=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_netpbm_ppm_writeppm" >&5
-echo "${ECHO_T}$ac_cv_lib_netpbm_ppm_writeppm" >&6; }
-if test $ac_cv_lib_netpbm_ppm_writeppm = yes; then
-  PPM_LIBDIR=. 
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_write_png" >&5
+echo "${ECHO_T}$ac_cv_lib_png_png_write_png" >&6; }
+if test $ac_cv_lib_png_png_write_png = yes; then
+  PNG_LIBDIR=. 
+fi
+
+fi
+if test x$PNG_LIBDIR = x; then
+        as_ac_File=`echo "ac_cv_file_/usr/local/lib/$PNG_LIBNAME" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for /usr/local/lib/$PNG_LIBNAME" >&5
+echo $ECHO_N "checking for /usr/local/lib/$PNG_LIBNAME... $ECHO_C" >&6; }
+if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  test "$cross_compiling" = yes &&
+  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+if test -r "/usr/local/lib/$PNG_LIBNAME"; then
+  eval "$as_ac_File=yes"
+else
+  eval "$as_ac_File=no"
+fi
+fi
+ac_res=`eval echo '${'$as_ac_File'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_File'}'` = yes; then
+  PNG_LIBDIR=/usr/local/lib 
 fi
 
 fi
-if test x$PPM_LIBDIR = x; then
-        as_ac_File=`echo "ac_cv_file_/usr/local/lib/$PPM_LIBNAME" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for /usr/local/lib/$PPM_LIBNAME" >&5
-echo $ECHO_N "checking for /usr/local/lib/$PPM_LIBNAME... $ECHO_C" >&6; }
+if test x$PNG_LIBDIR = x; then
+        as_ac_File=`echo "ac_cv_file_/usr/lib/$PNG_LIBNAME" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for /usr/lib/$PNG_LIBNAME" >&5
+echo $ECHO_N "checking for /usr/lib/$PNG_LIBNAME... $ECHO_C" >&6; }
 if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -8181,7 +8394,7 @@ else
   { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
 echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
    { (exit 1); exit 1; }; }
-if test -r "/usr/local/lib/$PPM_LIBNAME"; then
+if test -r "/usr/lib/$PNG_LIBNAME"; then
   eval "$as_ac_File=yes"
 else
   eval "$as_ac_File=no"
@@ -8191,14 +8404,14 @@ ac_res=`eval echo '${'$as_ac_File'}'`
 	       { echo "$as_me:$LINENO: result: $ac_res" >&5
 echo "${ECHO_T}$ac_res" >&6; }
 if test `eval echo '${'$as_ac_File'}'` = yes; then
-  PPM_LIBDIR=/usr/local/lib 
+  PNG_LIBDIR=/usr/lib 
 fi
 
 fi
-if test x$PPM_LIBDIR = x; then
-        as_ac_File=`echo "ac_cv_file_/usr/lib/$PPM_LIBNAME" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for /usr/lib/$PPM_LIBNAME" >&5
-echo $ECHO_N "checking for /usr/lib/$PPM_LIBNAME... $ECHO_C" >&6; }
+if test x$PNG_LIBDIR = x; then
+        as_ac_File=`echo "ac_cv_file_/lib/$PNG_LIBNAME" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for /lib/$PNG_LIBNAME" >&5
+echo $ECHO_N "checking for /lib/$PNG_LIBNAME... $ECHO_C" >&6; }
 if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -8206,7 +8419,7 @@ else
   { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
 echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
    { (exit 1); exit 1; }; }
-if test -r "/usr/lib/$PPM_LIBNAME"; then
+if test -r "/lib/$PNG_LIBNAME"; then
   eval "$as_ac_File=yes"
 else
   eval "$as_ac_File=no"
@@ -8216,14 +8429,14 @@ ac_res=`eval echo '${'$as_ac_File'}'`
 	       { echo "$as_me:$LINENO: result: $ac_res" >&5
 echo "${ECHO_T}$ac_res" >&6; }
 if test `eval echo '${'$as_ac_File'}'` = yes; then
-  PPM_LIBDIR=/usr/lib 
+  PNG_LIBDIR=/lib 
 fi
 
 fi
-if test x$PPM_LIBDIR = x; then
-        as_ac_File=`echo "ac_cv_file_/lib/$PPM_LIBNAME" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for /lib/$PPM_LIBNAME" >&5
-echo $ECHO_N "checking for /lib/$PPM_LIBNAME... $ECHO_C" >&6; }
+if test x$PNG_LIBDIR = x; then
+        as_ac_File=`echo "ac_cv_file_$HOME/lib/$PNG_LIBNAME" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $HOME/lib/$PNG_LIBNAME" >&5
+echo $ECHO_N "checking for $HOME/lib/$PNG_LIBNAME... $ECHO_C" >&6; }
 if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -8231,7 +8444,7 @@ else
   { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
 echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
    { (exit 1); exit 1; }; }
-if test -r "/lib/$PPM_LIBNAME"; then
+if test -r "$HOME/lib/$PNG_LIBNAME"; then
   eval "$as_ac_File=yes"
 else
   eval "$as_ac_File=no"
@@ -8241,14 +8454,14 @@ ac_res=`eval echo '${'$as_ac_File'}'`
 	       { echo "$as_me:$LINENO: result: $ac_res" >&5
 echo "${ECHO_T}$ac_res" >&6; }
 if test `eval echo '${'$as_ac_File'}'` = yes; then
-  PPM_LIBDIR=/lib 
+  PNG_LIBDIR=$HOME/lib 
 fi
 
 fi
-if test x$PPM_LIBDIR = x; then
-        as_ac_File=`echo "ac_cv_file_$HOME/lib/$PPM_LIBNAME" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $HOME/lib/$PPM_LIBNAME" >&5
-echo $ECHO_N "checking for $HOME/lib/$PPM_LIBNAME... $ECHO_C" >&6; }
+if test x$PNG_LIBDIR = x; then
+        as_ac_File=`echo "ac_cv_file_/sw/lib/$PNG_LIBNAME" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for /sw/lib/$PNG_LIBNAME" >&5
+echo $ECHO_N "checking for /sw/lib/$PNG_LIBNAME... $ECHO_C" >&6; }
 if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -8256,7 +8469,7 @@ else
   { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
 echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
    { (exit 1); exit 1; }; }
-if test -r "$HOME/lib/$PPM_LIBNAME"; then
+if test -r "/sw/lib/$PNG_LIBNAME"; then
   eval "$as_ac_File=yes"
 else
   eval "$as_ac_File=no"
@@ -8266,42 +8479,54 @@ ac_res=`eval echo '${'$as_ac_File'}'`
 	       { echo "$as_me:$LINENO: result: $ac_res" >&5
 echo "${ECHO_T}$ac_res" >&6; }
 if test `eval echo '${'$as_ac_File'}'` = yes; then
-  PPM_LIBDIR=$HOME/lib 
+  PNG_LIBDIR=/sw/lib 
 fi
 
 fi
+PNG_LIBNAME=`echo $PNG_LIBNAME | sed s/lib// | sed s/\.so//`
+PNG_PRESENT=no
+if test $PNG_INC_PRESENT = yes; then
+	if test x$PNG_LIBDIR != x; then
+		PNG_PRESENT=yes
+		PNG_LIBS=-l$PNG_LIBNAME
+		PNG_LDFLAGS="-L$PNG_LIBDIR $PNG_LIBS"
+		
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_PNG 1
+_ACEOF
+
+	fi
 fi
-PPM_LIBNAME=`echo $PPM_LIBNAME | sed s/lib// | sed s/\.so//`
 
 
 
 
-do_ppm=false
-if test x$PPM_INCDIR != x; then
-	if test x$PPM_LIBDIR != x; then
-		do_ppm=true
+do_png=false
+if test x$PNG_INCDIR != x; then
+	if test x$PNG_LIBDIR != x; then
+		do_png=true
 	fi
 fi
-if test $do_ppm = true; then
-	DO_PPM_LINE="INC_PPM   = -DINC_PPM"
-	DO_PPM_INCDIR="PPMINCDIR = -I$PPM_INCDIR"
-	DO_PPM_LIBDIR="PPMLIBDIR = -L$PPM_LIBDIR"
-	DO_PPM_LIBNAME="PPMLIB = -l$PPM_LIBNAME"
+if test $do_png = true; then
+	DO_PNG_LINE="INC_PNG   = -DINC_PNG"
+	DO_PNG_INCDIR="PNGINCDIR = -I$PNG_INCDIR"
+	DO_PNG_LIBDIR="PNGLIBDIR = -L$PNG_LIBDIR"
+	DO_PNG_LIBNAME="PNGLIB = -l$PNG_LIBNAME"
 else
 	echo "************************************************************************"
 	echo "Note: the -frames option is NOT enabled, because I could not find the "
-	echo "location of the PPM include file 'ppm.h' or library file"
-	echo "'libppm.a'.  Ncview uses the ppm package to dump out the frames viewed,"
+	echo "location of the PNG include file 'png.h' or library file"
+	echo "'libpng.so'.  Ncview uses the png package to dump out the frames viewed,"
 	echo "which is an easy way to make an mpeg video of the data if you want."
 	echo "If you do not want this feature, then don't worry about the lack"
-	echo "of ppm support.  If you DO want this, then you must tell me where to find"
-	echo "the ppm package by giving arguments to configure, as follows:"
-	echo "  ./configure -with-ppm_incdir=include_directory -with-ppm_libdir=library_directory"
+	echo "of png support.  If you DO want this, then you must install libpng, or tell "
+	echo "me where to find the png package by giving arguments to configure, as follows:"
+	echo "  ./configure -with-png_incdir=include_directory -with-png_libdir=library_directory"
 	echo "************************************************************************"
-	DO_PPM_LINE="#INC_PPM   = -DINC_PPM"
-	DO_PPM_INCDIR="#PPMINCDIR = -I$PPM_INCDIR"
-	DO_PPM_LIBDIR="#PPMLIBDIR = -I$PPM_LIBDIR"
-	DO_PPM_LIBNAME="#PPMLIB = -l$PPM_LIBNAME"
+	DO_PNG_LINE="#INC_PNG   = -DINC_PNG"
+	DO_PNG_INCDIR="#PNGINCDIR = -I$PNG_INCDIR"
+	DO_PNG_LIBDIR="#PNGLIBDIR = -I$PNG_LIBDIR"
+	DO_PNG_LIBNAME="#PNGLIB = -l$PNG_LIBNAME"
 fi
 
 
@@ -8404,10 +8629,19 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 # if it generally works or not.  Probably not.
 #----------------------------------------------------------------------------
 CC_TEST_SAME=$CC
-NETCDF_CC_TEST_SAME=$NETCDF_CC
+#-----------------------------------------------------------------------
+# Point of following obscure manipulations is that $CC can have multiple
+# words, for example, it could be "gcc -fPIC -lm". We want to keep only
+# the first word, so use 'set' and then take the first arg ($1).
+#-----------------------------------------------------------------------
+set $CC_TEST_SAME
+CC_TEST_SAME=$1
 if test x$CC_TEST_SAME = xcc; then
 	CC_TEST_SAME=gcc			
 fi
+NETCDF_CC_TEST_SAME=$NETCDF_CC
+set $NETCDF_CC_TEST_SAME
+NETCDF_CC_TEST_SAME=$1
 if test x$NETCDF_CC_TEST_SAME = xcc; then
 	NETCDF_CC_TEST_SAME=gcc
 fi
@@ -8444,7 +8678,7 @@ fi
 #	LIBS="-L/usr/local/lib -lnetcdf -L/home/pierce/lib -ludunits"
 # We want to convert this to -rpath flags suitable for the compiler, which would
 # have this format:
-#	"-Wl,R,/usr/local/lib -Wl,R,/home/pierce/lib"
+#	"-Wl,-rpath,/usr/local/lib -Wl,-rpath,/home/pierce/lib"
 #
 # As a safety check, I only do this for the GNU compiler, as I don't know if this
 # is anything like correct syntax for other compilers.  Note that this *does* work
@@ -8454,9 +8688,9 @@ fi
 if test x$ac_compiler_gnu = xyes; then
 	RPATH_FLAGS=""
 	for word in $UDUNITS2_LDFLAGS $NETCDF_LDFLAGS; do
-		if test `expr match $word -L/` -eq 3; then
+		if test `expr $word : -L/` -eq 3; then
 			RPDIR=`expr substr $word 3 999`;
-			RPATH_FLAGS="$RPATH_FLAGS -Wl,-R,$RPDIR"
+			RPATH_FLAGS="$RPATH_FLAGS -Wl,-rpath,$RPDIR"
 		fi
 	done
 	
@@ -9247,13 +9481,13 @@ ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
 DO_UDUNITS2_LIBNAME!$DO_UDUNITS2_LIBNAME$ac_delim
-PPM_INCDIR!$PPM_INCDIR$ac_delim
-PPM_LIBDIR!$PPM_LIBDIR$ac_delim
-PPM_LIBNAME!$PPM_LIBNAME$ac_delim
-DO_PPM_LINE!$DO_PPM_LINE$ac_delim
-DO_PPM_INCDIR!$DO_PPM_INCDIR$ac_delim
-DO_PPM_LIBDIR!$DO_PPM_LIBDIR$ac_delim
-DO_PPM_LIBNAME!$DO_PPM_LIBNAME$ac_delim
+PNG_CPPFLAGS!$PNG_CPPFLAGS$ac_delim
+PNG_LDFLAGS!$PNG_LDFLAGS$ac_delim
+PNG_LIBS!$PNG_LIBS$ac_delim
+DO_PNG_LINE!$DO_PNG_LINE$ac_delim
+DO_PNG_INCDIR!$DO_PNG_INCDIR$ac_delim
+DO_PNG_LIBDIR!$DO_PNG_LIBDIR$ac_delim
+DO_PNG_LIBNAME!$DO_PNG_LIBNAME$ac_delim
 PREFIX!$PREFIX$ac_delim
 X_INCLUDES!$X_INCLUDES$ac_delim
 RPATH_FLAGS!$RPATH_FLAGS$ac_delim
@@ -9865,16 +10099,17 @@ fi
 echo " "
 echo "----------- Configure Summary ----------"
 echo "Compiler:"
-echo "        CC                = $CC"
+echo "        CC                 = $CC"
+echo "        Runtime path flags = $RPATH_FLAGS"
 echo " "
-if test x"$with_udunits"x == "xnox"; then
-	echo "UDUNITS: not found"
-else
 echo "UDUNITS:"
+if test $do_udunits2 = true; then
 echo "        UDUNITS2_LIBS     = $UDUNITS2_LIBS"
 echo "        UDUNITS2_CPPFLAGS = $UDUNITS2_CPPFLAGS"
 echo "        UDUNITS2_LDFLAGS  = $UDUNITS2_LDFLAGS"
 echo " "
+else
+echo "        not found. Specify --with-udunits2_incdir=... and --with-udunits2_libdir=... flags to enable"
 fi
 
 echo " "
@@ -9892,4 +10127,14 @@ echo "        XAW_LIBS         = $XAW_LIBS"
 echo "        X_PRE_LIBS       = $X_PRE_LIBS"
 echo "        X_LIBS           = $X_LIBS"
 echo "        X_EXTRA_LIBS     = $X_EXTRA_LIBS"
+echo " "
+echo "PNG:"
+if test $do_png = true; then
+echo "        PNG_LIBS         = $PNG_LIBS"
+echo "        PNG_CPPFLAGS     = $PNG_CPPFLAGS"
+echo "        PNG_LDFLAGS      = $PNG_LDFLAGS"
+echo " "
+else
+echo "        not found. Install libpng, or specify --with-png_incdir=... and --with-png_libdir=... flags to enable"
+fi
 
diff --git a/autom4te.cache/output.1 b/autom4te.cache/output.1
index efebf0a..018887e 100644
--- a/autom4te.cache/output.1
+++ b/autom4te.cache/output.1
@@ -712,13 +712,13 @@ DO_UDUNITS2_LINE
 DO_UDUNITS2_INCDIR
 DO_UDUNITS2_LIBDIR
 DO_UDUNITS2_LIBNAME
-PPM_INCDIR
-PPM_LIBDIR
-PPM_LIBNAME
-DO_PPM_LINE
-DO_PPM_INCDIR
-DO_PPM_LIBDIR
-DO_PPM_LIBNAME
+PNG_CPPFLAGS
+PNG_LDFLAGS
+PNG_LIBS
+DO_PNG_LINE
+DO_PNG_INCDIR
+DO_PNG_LIBDIR
+DO_PNG_LIBNAME
 PREFIX
 X_INCLUDES
 RPATH_FLAGS
@@ -1324,8 +1324,8 @@ Optional Packages:
   --with-x                use the X Window System
   --with-udunits2_incdir=dir directory containing udunits2 includes
   --with-udunits2_libdir=dir directory containing udunits2 library
-  --with-ppm_incdir=dir directory containing ppm includes
-  --with-ppm_libdir=dir directory containing ppm library
+  --with-png_incdir=dir directory containing png includes
+  --with-png_libdir=dir directory containing png library
 
 Some influential environment variables:
   CC          C compiler command
@@ -5430,6 +5430,8 @@ fi
 
 if test x"$haveAthena"x = "xnox"; then
 	haveAthena=yes
+	{ echo "$as_me:$LINENO: checking for the Athena 3d widgets instead" >&5
+echo $ECHO_N "checking for the Athena 3d widgets instead... $ECHO_C" >&6; }
 	
 { echo "$as_me:$LINENO: checking for XawScrollbarSetThumb in -lXaw3d" >&5
 echo $ECHO_N "checking for XawScrollbarSetThumb in -lXaw3d... $ECHO_C" >&6; }
@@ -5848,14 +5850,71 @@ fi
 
 
 if test x"$haveAthena"x != "xyesx"; then
-  { { echo "$as_me:$LINENO: error: Could not find Athena widgets library and header.  Use your package manager to install the X windows development libraries and headers." >&5
-echo "$as_me: error: Could not find Athena widgets library and header.  Use your package manager to install the X windows development libraries and headers." >&2;}
+  # On AIX this fails because the Xmu header needs to be there as well...
+  { echo "$as_me:$LINENO: checking for X11/Xaw/Simple.h" >&5
+echo $ECHO_N "checking for X11/Xaw/Simple.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_X11_Xaw_Simple_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include<X11/Xmu/Xmu.h>
+
+
+@%:@include <X11/Xaw/Simple.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_header_X11_Xaw_Simple_h=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_header_X11_Xaw_Simple_h=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xaw_Simple_h" >&5
+echo "${ECHO_T}$ac_cv_header_X11_Xaw_Simple_h" >&6; }
+if test $ac_cv_header_X11_Xaw_Simple_h = yes; then
+  :
+else
+  haveAthena=no
+fi
+
+
+  if test x"$haveAthena"x != "xyesx"; then
+    { { echo "$as_me:$LINENO: error: Could not find Athena widgets library and header (checked w/Xmu.h included as well).  Use your package manager to install the X windows development libraries and headers." >&5
+echo "$as_me: error: Could not find Athena widgets library and header (checked w/Xmu.h included as well).  Use your package manager to install the X windows development libraries and headers." >&2;}
    { (exit 1); exit 1; }; }
+  fi
 fi
 XAW_LIBS=$LIBS
 echo "X Athena widget (Xaw) libraries: $XAW_LIBS"
 
 LIBS=$LIBSsave
+CFLAGS=$CFLAGSsave
 
 #------------------------------------------------------------------------------
 # Check for X11 library. It's not clear to me why this is necessary, yet Darwin 
@@ -5952,6 +6011,7 @@ X11_LIBS=$LIBS
 echo "X11 libraries: $X11_LIBS"
 
 LIBS=$LIBSsave
+CFLAGS=$CFLAGSsave
 
 # Handle udunits2
 
@@ -6945,8 +7005,12 @@ fi
 
 
 fi
+UDUNITS2_INC_PRESENT=no
 if test x$UDUNITS2_INCDIR != x; then
+	UDUNITS2_INC_PRESENT=yes
         UDUNITS2_CPPFLAGS=-I$UDUNITS2_INCDIR
+else
+	echo "** Could not find the udunits2.h file, udunits support will not be included **"
 fi
 UDUNITS2_LIBNAME=libudunits2.a
 
@@ -7181,15 +7245,17 @@ fi
 fi
 UDUNITS2_LIBNAME=`echo $UDUNITS2_LIBNAME | sed s/lib// | sed s/\.a//`
 UDUNITS2_PRESENT=no
-if test x$UDUNITS2_LIBDIR != x; then
-	UDUNITS2_PRESENT=yes
-	UDUNITS2_LIBS=-l$UDUNITS2_LIBNAME
-        UDUNITS2_LDFLAGS="-L$UDUNITS2_LIBDIR $UDUNITS2_LIBS"
-	
+if test $UDUNITS2_INC_PRESENT = yes; then
+	if test x$UDUNITS2_LIBDIR != x; then
+		UDUNITS2_PRESENT=yes
+		UDUNITS2_LIBS=-l$UDUNITS2_LIBNAME
+		UDUNITS2_LDFLAGS="-L$UDUNITS2_LIBDIR $UDUNITS2_LIBS"
+		
 cat >>confdefs.h <<\_ACEOF
 @%:@define HAVE_UDUNITS2 1
 _ACEOF
 
+	fi
 fi
 if test $UDUNITS2_PRESENT = yes; then
 	haveExpat=yes
@@ -7283,6 +7349,7 @@ echo "$as_me: error: Could not find the expat library despite the fact that the
 	echo "Expat libraries (needed by udunits2): $EXPAT_LIBS"
 	UDUNITS2_LDFLAGS="$UDUNITS2_LDFLAGS $LIBS"
 	LIBS=$LIBSsave
+	CFLAGS=$CFLAGSsave
 fi
 
 
@@ -7326,20 +7393,20 @@ fi
 
 
 
-# Handle ppm
+# Handle png
 
 
-# Check whether --with-ppm_incdir was given.
-if test "${with_ppm_incdir+set}" = set; then
-  withval=$with_ppm_incdir; PPM_INCDIR=$withval
+# Check whether --with-png_incdir was given.
+if test "${with_png_incdir+set}" = set; then
+  withval=$with_png_incdir; PNG_INCDIR=$withval
 fi
 
 err=0
-if test x$PPM_INCDIR != x; then
-        as_ac_Header=`echo "ac_cv_header_$PPM_INCDIR/ppm.h" | $as_tr_sh`
+if test x$PNG_INCDIR != x; then
+        as_ac_Header=`echo "ac_cv_header_$PNG_INCDIR/png.h" | $as_tr_sh`
 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { echo "$as_me:$LINENO: checking for $PPM_INCDIR/ppm.h" >&5
-echo $ECHO_N "checking for $PPM_INCDIR/ppm.h... $ECHO_C" >&6; }
+  { echo "$as_me:$LINENO: checking for $PNG_INCDIR/png.h" >&5
+echo $ECHO_N "checking for $PNG_INCDIR/png.h... $ECHO_C" >&6; }
 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
@@ -7348,8 +7415,8 @@ ac_res=`eval echo '${'$as_ac_Header'}'`
 echo "${ECHO_T}$ac_res" >&6; }
 else
   # Is the header compilable?
-{ echo "$as_me:$LINENO: checking $PPM_INCDIR/ppm.h usability" >&5
-echo $ECHO_N "checking $PPM_INCDIR/ppm.h usability... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking $PNG_INCDIR/png.h usability" >&5
+echo $ECHO_N "checking $PNG_INCDIR/png.h usability... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -7357,7 +7424,7 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-@%:@include <$PPM_INCDIR/ppm.h>
+@%:@include <$PNG_INCDIR/png.h>
 _ACEOF
 rm -f conftest.$ac_objext
 if { (ac_try="$ac_compile"
@@ -7389,15 +7456,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 echo "${ECHO_T}$ac_header_compiler" >&6; }
 
 # Is the header present?
-{ echo "$as_me:$LINENO: checking $PPM_INCDIR/ppm.h presence" >&5
-echo $ECHO_N "checking $PPM_INCDIR/ppm.h presence... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking $PNG_INCDIR/png.h presence" >&5
+echo $ECHO_N "checking $PNG_INCDIR/png.h presence... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-@%:@include <$PPM_INCDIR/ppm.h>
+@%:@include <$PNG_INCDIR/png.h>
 _ACEOF
 if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
@@ -7430,25 +7497,25 @@ echo "${ECHO_T}$ac_header_preproc" >&6; }
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
   yes:no: )
-    { echo "$as_me:$LINENO: WARNING: $PPM_INCDIR/ppm.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $PPM_INCDIR/ppm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $PPM_INCDIR/ppm.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $PPM_INCDIR/ppm.h: proceeding with the compiler's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $PNG_INCDIR/png.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $PNG_INCDIR/png.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $PNG_INCDIR/png.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $PNG_INCDIR/png.h: proceeding with the compiler's result" >&2;}
     ac_header_preproc=yes
     ;;
   no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: $PPM_INCDIR/ppm.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $PPM_INCDIR/ppm.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $PPM_INCDIR/ppm.h:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $PPM_INCDIR/ppm.h:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $PPM_INCDIR/ppm.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $PPM_INCDIR/ppm.h: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $PPM_INCDIR/ppm.h:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $PPM_INCDIR/ppm.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $PPM_INCDIR/ppm.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $PPM_INCDIR/ppm.h: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $PPM_INCDIR/ppm.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $PPM_INCDIR/ppm.h: in the future, the compiler will take precedence" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $PNG_INCDIR/png.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $PNG_INCDIR/png.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $PNG_INCDIR/png.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $PNG_INCDIR/png.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $PNG_INCDIR/png.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $PNG_INCDIR/png.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $PNG_INCDIR/png.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $PNG_INCDIR/png.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $PNG_INCDIR/png.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $PNG_INCDIR/png.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $PNG_INCDIR/png.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $PNG_INCDIR/png.h: in the future, the compiler will take precedence" >&2;}
     ( cat <<\_ASBOX
 @%:@@%:@ ------------------------------- @%:@@%:@
 @%:@@%:@ Report this to dpierce at ucsd.edu @%:@@%:@
@@ -7457,8 +7524,8 @@ _ASBOX
      ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
-{ echo "$as_me:$LINENO: checking for $PPM_INCDIR/ppm.h" >&5
-echo $ECHO_N "checking for $PPM_INCDIR/ppm.h... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking for $PNG_INCDIR/png.h" >&5
+echo $ECHO_N "checking for $PNG_INCDIR/png.h... $ECHO_C" >&6; }
 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -7470,30 +7537,38 @@ echo "${ECHO_T}$ac_res" >&6; }
 
 fi
 if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  echo "Using user-specified ppm include dir=$PPM_INCDIR"
+  echo "Using user-specified png include dir=$PNG_INCDIR"
 else
   err=1 
 fi
 
 
+	if test $err -eq 1; then
+		echo "--------------------------------------------------------------------------------"
+		echo "Error: You specified that the pnginclude directory is $PNG_INCDIR"
+		echo "but that directory does NOT have required png include file png.h."
+		echo "You must specify a directory that has the png include files"
+		echo "--------------------------------------------------------------------------------"
+		exit -1
+	fi
 fi
 if test $err -eq 1; then
-        echo "Error: user specified ppm include directory does not have ppm.h!"
+        echo "Error: user specified png include directory does not have png.h!"
         exit -1
 fi
-if test x$PPM_INCDIR = x; then
-        if test "${ac_cv_header__usr_local_include_ppm_h+set}" = set; then
-  { echo "$as_me:$LINENO: checking for /usr/local/include/ppm.h" >&5
-echo $ECHO_N "checking for /usr/local/include/ppm.h... $ECHO_C" >&6; }
-if test "${ac_cv_header__usr_local_include_ppm_h+set}" = set; then
+if test x$PNG_INCDIR = x; then
+        if test "${ac_cv_header_png_h+set}" = set; then
+  { echo "$as_me:$LINENO: checking for png.h" >&5
+echo $ECHO_N "checking for png.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_png_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header__usr_local_include_ppm_h" >&5
-echo "${ECHO_T}$ac_cv_header__usr_local_include_ppm_h" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_header_png_h" >&5
+echo "${ECHO_T}$ac_cv_header_png_h" >&6; }
 else
   # Is the header compilable?
-{ echo "$as_me:$LINENO: checking /usr/local/include/ppm.h usability" >&5
-echo $ECHO_N "checking /usr/local/include/ppm.h usability... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking png.h usability" >&5
+echo $ECHO_N "checking png.h usability... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -7501,7 +7576,7 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-@%:@include </usr/local/include/ppm.h>
+@%:@include <png.h>
 _ACEOF
 rm -f conftest.$ac_objext
 if { (ac_try="$ac_compile"
@@ -7533,15 +7608,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 echo "${ECHO_T}$ac_header_compiler" >&6; }
 
 # Is the header present?
-{ echo "$as_me:$LINENO: checking /usr/local/include/ppm.h presence" >&5
-echo $ECHO_N "checking /usr/local/include/ppm.h presence... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking png.h presence" >&5
+echo $ECHO_N "checking png.h presence... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-@%:@include </usr/local/include/ppm.h>
+@%:@include <png.h>
 _ACEOF
 if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
@@ -7574,25 +7649,25 @@ echo "${ECHO_T}$ac_header_preproc" >&6; }
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
   yes:no: )
-    { echo "$as_me:$LINENO: WARNING: /usr/local/include/ppm.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: /usr/local/include/ppm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: /usr/local/include/ppm.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: /usr/local/include/ppm.h: proceeding with the compiler's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: png.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: png.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: png.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: png.h: proceeding with the compiler's result" >&2;}
     ac_header_preproc=yes
     ;;
   no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: /usr/local/include/ppm.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: /usr/local/include/ppm.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: /usr/local/include/ppm.h:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: /usr/local/include/ppm.h:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: /usr/local/include/ppm.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: /usr/local/include/ppm.h: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: /usr/local/include/ppm.h:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: /usr/local/include/ppm.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: /usr/local/include/ppm.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: /usr/local/include/ppm.h: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: /usr/local/include/ppm.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: /usr/local/include/ppm.h: in the future, the compiler will take precedence" >&2;}
+    { echo "$as_me:$LINENO: WARNING: png.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: png.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: png.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: png.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: png.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: png.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: png.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: png.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: png.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: png.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: png.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: png.h: in the future, the compiler will take precedence" >&2;}
     ( cat <<\_ASBOX
 @%:@@%:@ ------------------------------- @%:@@%:@
 @%:@@%:@ Report this to dpierce at ucsd.edu @%:@@%:@
@@ -7601,36 +7676,36 @@ _ASBOX
      ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
-{ echo "$as_me:$LINENO: checking for /usr/local/include/ppm.h" >&5
-echo $ECHO_N "checking for /usr/local/include/ppm.h... $ECHO_C" >&6; }
-if test "${ac_cv_header__usr_local_include_ppm_h+set}" = set; then
+{ echo "$as_me:$LINENO: checking for png.h" >&5
+echo $ECHO_N "checking for png.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_png_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_cv_header__usr_local_include_ppm_h=$ac_header_preproc
+  ac_cv_header_png_h=$ac_header_preproc
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header__usr_local_include_ppm_h" >&5
-echo "${ECHO_T}$ac_cv_header__usr_local_include_ppm_h" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_header_png_h" >&5
+echo "${ECHO_T}$ac_cv_header_png_h" >&6; }
 
 fi
-if test $ac_cv_header__usr_local_include_ppm_h = yes; then
-  PPM_INCDIR=/usr/local/include 
+if test $ac_cv_header_png_h = yes; then
+  PNG_INCDIR=. 
 fi
 
 
 fi
-if test x$PPM_INCDIR = x; then
-        if test "${ac_cv_header__usr_include_ppm_h+set}" = set; then
-  { echo "$as_me:$LINENO: checking for /usr/include/ppm.h" >&5
-echo $ECHO_N "checking for /usr/include/ppm.h... $ECHO_C" >&6; }
-if test "${ac_cv_header__usr_include_ppm_h+set}" = set; then
+if test x$PNG_INCDIR = x; then
+        if test "${ac_cv_header__usr_local_include_png_h+set}" = set; then
+  { echo "$as_me:$LINENO: checking for /usr/local/include/png.h" >&5
+echo $ECHO_N "checking for /usr/local/include/png.h... $ECHO_C" >&6; }
+if test "${ac_cv_header__usr_local_include_png_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header__usr_include_ppm_h" >&5
-echo "${ECHO_T}$ac_cv_header__usr_include_ppm_h" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_header__usr_local_include_png_h" >&5
+echo "${ECHO_T}$ac_cv_header__usr_local_include_png_h" >&6; }
 else
   # Is the header compilable?
-{ echo "$as_me:$LINENO: checking /usr/include/ppm.h usability" >&5
-echo $ECHO_N "checking /usr/include/ppm.h usability... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking /usr/local/include/png.h usability" >&5
+echo $ECHO_N "checking /usr/local/include/png.h usability... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -7638,7 +7713,7 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-@%:@include </usr/include/ppm.h>
+@%:@include </usr/local/include/png.h>
 _ACEOF
 rm -f conftest.$ac_objext
 if { (ac_try="$ac_compile"
@@ -7670,15 +7745,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 echo "${ECHO_T}$ac_header_compiler" >&6; }
 
 # Is the header present?
-{ echo "$as_me:$LINENO: checking /usr/include/ppm.h presence" >&5
-echo $ECHO_N "checking /usr/include/ppm.h presence... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking /usr/local/include/png.h presence" >&5
+echo $ECHO_N "checking /usr/local/include/png.h presence... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-@%:@include </usr/include/ppm.h>
+@%:@include </usr/local/include/png.h>
 _ACEOF
 if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
@@ -7711,25 +7786,25 @@ echo "${ECHO_T}$ac_header_preproc" >&6; }
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
   yes:no: )
-    { echo "$as_me:$LINENO: WARNING: /usr/include/ppm.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: /usr/include/ppm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: /usr/include/ppm.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: /usr/include/ppm.h: proceeding with the compiler's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/local/include/png.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: /usr/local/include/png.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/local/include/png.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: /usr/local/include/png.h: proceeding with the compiler's result" >&2;}
     ac_header_preproc=yes
     ;;
   no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: /usr/include/ppm.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: /usr/include/ppm.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: /usr/include/ppm.h:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: /usr/include/ppm.h:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: /usr/include/ppm.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: /usr/include/ppm.h: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: /usr/include/ppm.h:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: /usr/include/ppm.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: /usr/include/ppm.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: /usr/include/ppm.h: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: /usr/include/ppm.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: /usr/include/ppm.h: in the future, the compiler will take precedence" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/local/include/png.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: /usr/local/include/png.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/local/include/png.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: /usr/local/include/png.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/local/include/png.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: /usr/local/include/png.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/local/include/png.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: /usr/local/include/png.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/local/include/png.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: /usr/local/include/png.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/local/include/png.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: /usr/local/include/png.h: in the future, the compiler will take precedence" >&2;}
     ( cat <<\_ASBOX
 @%:@@%:@ ------------------------------- @%:@@%:@
 @%:@@%:@ Report this to dpierce at ucsd.edu @%:@@%:@
@@ -7738,38 +7813,36 @@ _ASBOX
      ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
-{ echo "$as_me:$LINENO: checking for /usr/include/ppm.h" >&5
-echo $ECHO_N "checking for /usr/include/ppm.h... $ECHO_C" >&6; }
-if test "${ac_cv_header__usr_include_ppm_h+set}" = set; then
+{ echo "$as_me:$LINENO: checking for /usr/local/include/png.h" >&5
+echo $ECHO_N "checking for /usr/local/include/png.h... $ECHO_C" >&6; }
+if test "${ac_cv_header__usr_local_include_png_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_cv_header__usr_include_ppm_h=$ac_header_preproc
+  ac_cv_header__usr_local_include_png_h=$ac_header_preproc
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header__usr_include_ppm_h" >&5
-echo "${ECHO_T}$ac_cv_header__usr_include_ppm_h" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_header__usr_local_include_png_h" >&5
+echo "${ECHO_T}$ac_cv_header__usr_local_include_png_h" >&6; }
 
 fi
-if test $ac_cv_header__usr_include_ppm_h = yes; then
-  PPM_INCDIR=/usr/include 
+if test $ac_cv_header__usr_local_include_png_h = yes; then
+  PNG_INCDIR=/usr/local/include 
 fi
 
 
 fi
-if test x$PPM_INCDIR = x; then
-        as_ac_Header=`echo "ac_cv_header_$HOME/include/ppm.h" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { echo "$as_me:$LINENO: checking for $HOME/include/ppm.h" >&5
-echo $ECHO_N "checking for $HOME/include/ppm.h... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+if test x$PNG_INCDIR = x; then
+        if test "${ac_cv_header__usr_include_png_h+set}" = set; then
+  { echo "$as_me:$LINENO: checking for /usr/include/png.h" >&5
+echo $ECHO_N "checking for /usr/include/png.h... $ECHO_C" >&6; }
+if test "${ac_cv_header__usr_include_png_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_header__usr_include_png_h" >&5
+echo "${ECHO_T}$ac_cv_header__usr_include_png_h" >&6; }
 else
   # Is the header compilable?
-{ echo "$as_me:$LINENO: checking $HOME/include/ppm.h usability" >&5
-echo $ECHO_N "checking $HOME/include/ppm.h usability... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking /usr/include/png.h usability" >&5
+echo $ECHO_N "checking /usr/include/png.h usability... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -7777,7 +7850,7 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-@%:@include <$HOME/include/ppm.h>
+@%:@include </usr/include/png.h>
 _ACEOF
 rm -f conftest.$ac_objext
 if { (ac_try="$ac_compile"
@@ -7809,15 +7882,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 echo "${ECHO_T}$ac_header_compiler" >&6; }
 
 # Is the header present?
-{ echo "$as_me:$LINENO: checking $HOME/include/ppm.h presence" >&5
-echo $ECHO_N "checking $HOME/include/ppm.h presence... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking /usr/include/png.h presence" >&5
+echo $ECHO_N "checking /usr/include/png.h presence... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-@%:@include <$HOME/include/ppm.h>
+@%:@include </usr/include/png.h>
 _ACEOF
 if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
@@ -7850,25 +7923,25 @@ echo "${ECHO_T}$ac_header_preproc" >&6; }
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
   yes:no: )
-    { echo "$as_me:$LINENO: WARNING: $HOME/include/ppm.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $HOME/include/ppm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $HOME/include/ppm.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $HOME/include/ppm.h: proceeding with the compiler's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/include/png.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: /usr/include/png.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/include/png.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: /usr/include/png.h: proceeding with the compiler's result" >&2;}
     ac_header_preproc=yes
     ;;
   no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: $HOME/include/ppm.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $HOME/include/ppm.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $HOME/include/ppm.h:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $HOME/include/ppm.h:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $HOME/include/ppm.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $HOME/include/ppm.h: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $HOME/include/ppm.h:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $HOME/include/ppm.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $HOME/include/ppm.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $HOME/include/ppm.h: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $HOME/include/ppm.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $HOME/include/ppm.h: in the future, the compiler will take precedence" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/include/png.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: /usr/include/png.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/include/png.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: /usr/include/png.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/include/png.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: /usr/include/png.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/include/png.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: /usr/include/png.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/include/png.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: /usr/include/png.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/include/png.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: /usr/include/png.h: in the future, the compiler will take precedence" >&2;}
     ( cat <<\_ASBOX
 @%:@@%:@ ------------------------------- @%:@@%:@
 @%:@@%:@ Report this to dpierce at ucsd.edu @%:@@%:@
@@ -7877,101 +7950,193 @@ _ASBOX
      ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
-{ echo "$as_me:$LINENO: checking for $HOME/include/ppm.h" >&5
-echo $ECHO_N "checking for $HOME/include/ppm.h... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+{ echo "$as_me:$LINENO: checking for /usr/include/png.h" >&5
+echo $ECHO_N "checking for /usr/include/png.h... $ECHO_C" >&6; }
+if test "${ac_cv_header__usr_include_png_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  eval "$as_ac_Header=\$ac_header_preproc"
+  ac_cv_header__usr_include_png_h=$ac_header_preproc
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header__usr_include_png_h" >&5
+echo "${ECHO_T}$ac_cv_header__usr_include_png_h" >&6; }
+
+fi
+if test $ac_cv_header__usr_include_png_h = yes; then
+  PNG_INCDIR=/usr/include 
+fi
+
+
+fi
+if test x$PNG_INCDIR = x; then
+        as_ac_Header=`echo "ac_cv_header_$HOME/include/png.h" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $HOME/include/png.h" >&5
+echo $ECHO_N "checking for $HOME/include/png.h... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
 ac_res=`eval echo '${'$as_ac_Header'}'`
 	       { echo "$as_me:$LINENO: result: $ac_res" >&5
 echo "${ECHO_T}$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $HOME/include/png.h usability" >&5
+echo $ECHO_N "checking $HOME/include/png.h usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+@%:@include <$HOME/include/png.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  PPM_INCDIR=$HOME/include 
+	ac_header_compiler=no
 fi
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
 
-fi
-PPM_LIBNAME=libppm.so
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $HOME/include/png.h presence" >&5
+echo $ECHO_N "checking $HOME/include/png.h presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+@%:@include <$HOME/include/png.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-# Check whether --with-ppm_libdir was given.
-if test "${with_ppm_libdir+set}" = set; then
-  withval=$with_ppm_libdir; PPM_LIBDIR=$withval
+  ac_header_preproc=no
 fi
 
-err=0
-if test x$PPM_LIBDIR != x; then
-        as_ac_File=`echo "ac_cv_file_$PPM_LIBDIR/$PPM_LIBNAME" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $PPM_LIBDIR/$PPM_LIBNAME" >&5
-echo $ECHO_N "checking for $PPM_LIBDIR/$PPM_LIBNAME... $ECHO_C" >&6; }
-if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $HOME/include/png.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $HOME/include/png.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $HOME/include/png.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $HOME/include/png.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $HOME/include/png.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $HOME/include/png.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $HOME/include/png.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $HOME/include/png.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $HOME/include/png.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $HOME/include/png.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $HOME/include/png.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $HOME/include/png.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $HOME/include/png.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $HOME/include/png.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $HOME/include/png.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $HOME/include/png.h: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+@%:@@%:@ ------------------------------- @%:@@%:@
+@%:@@%:@ Report this to dpierce at ucsd.edu @%:@@%:@
+@%:@@%:@ ------------------------------- @%:@@%:@
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for $HOME/include/png.h" >&5
+echo $ECHO_N "checking for $HOME/include/png.h... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  test "$cross_compiling" = yes &&
-  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
-echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
-   { (exit 1); exit 1; }; }
-if test -r "$PPM_LIBDIR/$PPM_LIBNAME"; then
-  eval "$as_ac_File=yes"
-else
-  eval "$as_ac_File=no"
-fi
+  eval "$as_ac_Header=\$ac_header_preproc"
 fi
-ac_res=`eval echo '${'$as_ac_File'}'`
+ac_res=`eval echo '${'$as_ac_Header'}'`
 	       { echo "$as_me:$LINENO: result: $ac_res" >&5
 echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_File'}'` = yes; then
-  echo "Using user-specified ppm library dir=$PPM_LIBDIR"
-else
-  err=1 
-fi
 
 fi
-if test $err -eq 1; then
-        echo "Error: user specified ppm library directory does not have $PPM_LIBNAME !"
-        exit -1
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  PNG_INCDIR=$HOME/include 
 fi
-if test x$PPM_LIBDIR = x; then
-	{ echo "$as_me:$LINENO: checking for ppm_writeppm in -lppm" >&5
-echo $ECHO_N "checking for ppm_writeppm in -lppm... $ECHO_C" >&6; }
-if test "${ac_cv_lib_ppm_ppm_writeppm+set}" = set; then
+
+
+fi
+if test x$PNG_INCDIR = x; then
+        if test "${ac_cv_header__sw_include_png_h+set}" = set; then
+  { echo "$as_me:$LINENO: checking for /sw/include/png.h" >&5
+echo $ECHO_N "checking for /sw/include/png.h... $ECHO_C" >&6; }
+if test "${ac_cv_header__sw_include_png_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header__sw_include_png_h" >&5
+echo "${ECHO_T}$ac_cv_header__sw_include_png_h" >&6; }
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lppm  $LIBS"
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking /sw/include/png.h usability" >&5
+echo $ECHO_N "checking /sw/include/png.h usability... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char ppm_writeppm ();
-int
-main ()
-{
-return ppm_writeppm ();
-  ;
-  return 0;
-}
+$ac_includes_default
+@%:@include </sw/include/png.h>
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -7980,106 +8145,125 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_ppm_ppm_writeppm=yes
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	ac_cv_lib_ppm_ppm_writeppm=no
+	ac_header_compiler=no
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_ppm_ppm_writeppm" >&5
-echo "${ECHO_T}$ac_cv_lib_ppm_ppm_writeppm" >&6; }
-if test $ac_cv_lib_ppm_ppm_writeppm = yes; then
-  PPM_LIBDIR=. 
-fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
 
-fi
-if test x$PPM_LIBDIR = x; then
-        as_ac_File=`echo "ac_cv_file_/usr/local/lib/$PPM_LIBNAME" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for /usr/local/lib/$PPM_LIBNAME" >&5
-echo $ECHO_N "checking for /usr/local/lib/$PPM_LIBNAME... $ECHO_C" >&6; }
-if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  test "$cross_compiling" = yes &&
-  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
-echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
-   { (exit 1); exit 1; }; }
-if test -r "/usr/local/lib/$PPM_LIBNAME"; then
-  eval "$as_ac_File=yes"
+# Is the header present?
+{ echo "$as_me:$LINENO: checking /sw/include/png.h presence" >&5
+echo $ECHO_N "checking /sw/include/png.h presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+@%:@include </sw/include/png.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
 else
-  eval "$as_ac_File=no"
-fi
-fi
-ac_res=`eval echo '${'$as_ac_File'}'`
-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_File'}'` = yes; then
-  PPM_LIBDIR=/usr/local/lib 
-fi
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+  ac_header_preproc=no
 fi
-if test x$PPM_LIBDIR = x; then
-        as_ac_File=`echo "ac_cv_file_/usr/lib/$PPM_LIBNAME" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for /usr/lib/$PPM_LIBNAME" >&5
-echo $ECHO_N "checking for /usr/lib/$PPM_LIBNAME... $ECHO_C" >&6; }
-if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: /sw/include/png.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: /sw/include/png.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /sw/include/png.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: /sw/include/png.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: /sw/include/png.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: /sw/include/png.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /sw/include/png.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: /sw/include/png.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /sw/include/png.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: /sw/include/png.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /sw/include/png.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: /sw/include/png.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /sw/include/png.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: /sw/include/png.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /sw/include/png.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: /sw/include/png.h: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+@%:@@%:@ ------------------------------- @%:@@%:@
+@%:@@%:@ Report this to dpierce at ucsd.edu @%:@@%:@
+@%:@@%:@ ------------------------------- @%:@@%:@
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for /sw/include/png.h" >&5
+echo $ECHO_N "checking for /sw/include/png.h... $ECHO_C" >&6; }
+if test "${ac_cv_header__sw_include_png_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  test "$cross_compiling" = yes &&
-  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
-echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
-   { (exit 1); exit 1; }; }
-if test -r "/usr/lib/$PPM_LIBNAME"; then
-  eval "$as_ac_File=yes"
-else
-  eval "$as_ac_File=no"
+  ac_cv_header__sw_include_png_h=$ac_header_preproc
 fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header__sw_include_png_h" >&5
+echo "${ECHO_T}$ac_cv_header__sw_include_png_h" >&6; }
+
 fi
-ac_res=`eval echo '${'$as_ac_File'}'`
-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_File'}'` = yes; then
-  PPM_LIBDIR=/usr/lib 
+if test $ac_cv_header__sw_include_png_h = yes; then
+  PNG_INCDIR=/sw/include 
 fi
 
+
 fi
-if test x$PPM_LIBDIR = x; then
-        as_ac_File=`echo "ac_cv_file_/lib/$PPM_LIBNAME" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for /lib/$PPM_LIBNAME" >&5
-echo $ECHO_N "checking for /lib/$PPM_LIBNAME... $ECHO_C" >&6; }
-if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+PNG_INC_PRESENT=no
+if test x$PNG_INCDIR != x; then
+	PNG_INC_PRESENT=yes
+        PNG_CPPFLAGS=-I$PNG_INCDIR
 else
-  test "$cross_compiling" = yes &&
-  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
-echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
-   { (exit 1); exit 1; }; }
-if test -r "/lib/$PPM_LIBNAME"; then
-  eval "$as_ac_File=yes"
-else
-  eval "$as_ac_File=no"
-fi
-fi
-ac_res=`eval echo '${'$as_ac_File'}'`
-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_File'}'` = yes; then
-  PPM_LIBDIR=/lib 
+	echo "** Could not find the png.h file, so -frames support will not be included  **"
+	echo "** Install the PNG library (and development headers) to fix this           **"
 fi
+PNG_LIBNAME=libpng.so
 
+# Check whether --with-png_libdir was given.
+if test "${with_png_libdir+set}" = set; then
+  withval=$with_png_libdir; PNG_LIBDIR=$withval
 fi
-if test x$PPM_LIBDIR = x; then
-        as_ac_File=`echo "ac_cv_file_$HOME/lib/$PPM_LIBNAME" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $HOME/lib/$PPM_LIBNAME" >&5
-echo $ECHO_N "checking for $HOME/lib/$PPM_LIBNAME... $ECHO_C" >&6; }
+
+err=0
+if test x$PNG_LIBDIR != x; then
+        as_ac_File=`echo "ac_cv_file_$PNG_LIBDIR/$PNG_LIBNAME" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $PNG_LIBDIR/$PNG_LIBNAME" >&5
+echo $ECHO_N "checking for $PNG_LIBDIR/$PNG_LIBNAME... $ECHO_C" >&6; }
 if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -8087,7 +8271,7 @@ else
   { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
 echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
    { (exit 1); exit 1; }; }
-if test -r "$HOME/lib/$PPM_LIBNAME"; then
+if test -r "$PNG_LIBDIR/$PNG_LIBNAME"; then
   eval "$as_ac_File=yes"
 else
   eval "$as_ac_File=no"
@@ -8097,20 +8281,24 @@ ac_res=`eval echo '${'$as_ac_File'}'`
 	       { echo "$as_me:$LINENO: result: $ac_res" >&5
 echo "${ECHO_T}$ac_res" >&6; }
 if test `eval echo '${'$as_ac_File'}'` = yes; then
-  PPM_LIBDIR=$HOME/lib 
+  echo "Using user-specified png library dir=$PNG_LIBDIR"
+else
+  err=1 
 fi
 
 fi
-if test x$PPM_LIBDIR = x; then
-PPM_LIBNAME=libnetpbm.so
-if test x$PPM_LIBDIR = x; then
-	{ echo "$as_me:$LINENO: checking for ppm_writeppm in -lnetpbm" >&5
-echo $ECHO_N "checking for ppm_writeppm in -lnetpbm... $ECHO_C" >&6; }
-if test "${ac_cv_lib_netpbm_ppm_writeppm+set}" = set; then
+if test $err -eq 1; then
+        echo "Error: user specified png library directory does not have $PNG_LIBNAME !"
+        exit -1
+fi
+if test x$PNG_LIBDIR = x; then
+        { echo "$as_me:$LINENO: checking for png_write_png in -lpng" >&5
+echo $ECHO_N "checking for png_write_png in -lpng... $ECHO_C" >&6; }
+if test "${ac_cv_lib_png_png_write_png+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lnetpbm  $LIBS"
+LIBS="-lpng  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -8124,11 +8312,11 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
-char ppm_writeppm ();
+char png_write_png ();
 int
 main ()
 {
-return ppm_writeppm ();
+return png_write_png ();
   ;
   return 0;
 }
@@ -8151,29 +8339,54 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 	 test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_netpbm_ppm_writeppm=yes
+  ac_cv_lib_png_png_write_png=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	ac_cv_lib_netpbm_ppm_writeppm=no
+	ac_cv_lib_png_png_write_png=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_netpbm_ppm_writeppm" >&5
-echo "${ECHO_T}$ac_cv_lib_netpbm_ppm_writeppm" >&6; }
-if test $ac_cv_lib_netpbm_ppm_writeppm = yes; then
-  PPM_LIBDIR=. 
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_write_png" >&5
+echo "${ECHO_T}$ac_cv_lib_png_png_write_png" >&6; }
+if test $ac_cv_lib_png_png_write_png = yes; then
+  PNG_LIBDIR=. 
+fi
+
+fi
+if test x$PNG_LIBDIR = x; then
+        as_ac_File=`echo "ac_cv_file_/usr/local/lib/$PNG_LIBNAME" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for /usr/local/lib/$PNG_LIBNAME" >&5
+echo $ECHO_N "checking for /usr/local/lib/$PNG_LIBNAME... $ECHO_C" >&6; }
+if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  test "$cross_compiling" = yes &&
+  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+if test -r "/usr/local/lib/$PNG_LIBNAME"; then
+  eval "$as_ac_File=yes"
+else
+  eval "$as_ac_File=no"
+fi
+fi
+ac_res=`eval echo '${'$as_ac_File'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_File'}'` = yes; then
+  PNG_LIBDIR=/usr/local/lib 
 fi
 
 fi
-if test x$PPM_LIBDIR = x; then
-        as_ac_File=`echo "ac_cv_file_/usr/local/lib/$PPM_LIBNAME" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for /usr/local/lib/$PPM_LIBNAME" >&5
-echo $ECHO_N "checking for /usr/local/lib/$PPM_LIBNAME... $ECHO_C" >&6; }
+if test x$PNG_LIBDIR = x; then
+        as_ac_File=`echo "ac_cv_file_/usr/lib/$PNG_LIBNAME" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for /usr/lib/$PNG_LIBNAME" >&5
+echo $ECHO_N "checking for /usr/lib/$PNG_LIBNAME... $ECHO_C" >&6; }
 if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -8181,7 +8394,7 @@ else
   { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
 echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
    { (exit 1); exit 1; }; }
-if test -r "/usr/local/lib/$PPM_LIBNAME"; then
+if test -r "/usr/lib/$PNG_LIBNAME"; then
   eval "$as_ac_File=yes"
 else
   eval "$as_ac_File=no"
@@ -8191,14 +8404,14 @@ ac_res=`eval echo '${'$as_ac_File'}'`
 	       { echo "$as_me:$LINENO: result: $ac_res" >&5
 echo "${ECHO_T}$ac_res" >&6; }
 if test `eval echo '${'$as_ac_File'}'` = yes; then
-  PPM_LIBDIR=/usr/local/lib 
+  PNG_LIBDIR=/usr/lib 
 fi
 
 fi
-if test x$PPM_LIBDIR = x; then
-        as_ac_File=`echo "ac_cv_file_/usr/lib/$PPM_LIBNAME" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for /usr/lib/$PPM_LIBNAME" >&5
-echo $ECHO_N "checking for /usr/lib/$PPM_LIBNAME... $ECHO_C" >&6; }
+if test x$PNG_LIBDIR = x; then
+        as_ac_File=`echo "ac_cv_file_/lib/$PNG_LIBNAME" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for /lib/$PNG_LIBNAME" >&5
+echo $ECHO_N "checking for /lib/$PNG_LIBNAME... $ECHO_C" >&6; }
 if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -8206,7 +8419,7 @@ else
   { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
 echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
    { (exit 1); exit 1; }; }
-if test -r "/usr/lib/$PPM_LIBNAME"; then
+if test -r "/lib/$PNG_LIBNAME"; then
   eval "$as_ac_File=yes"
 else
   eval "$as_ac_File=no"
@@ -8216,14 +8429,14 @@ ac_res=`eval echo '${'$as_ac_File'}'`
 	       { echo "$as_me:$LINENO: result: $ac_res" >&5
 echo "${ECHO_T}$ac_res" >&6; }
 if test `eval echo '${'$as_ac_File'}'` = yes; then
-  PPM_LIBDIR=/usr/lib 
+  PNG_LIBDIR=/lib 
 fi
 
 fi
-if test x$PPM_LIBDIR = x; then
-        as_ac_File=`echo "ac_cv_file_/lib/$PPM_LIBNAME" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for /lib/$PPM_LIBNAME" >&5
-echo $ECHO_N "checking for /lib/$PPM_LIBNAME... $ECHO_C" >&6; }
+if test x$PNG_LIBDIR = x; then
+        as_ac_File=`echo "ac_cv_file_$HOME/lib/$PNG_LIBNAME" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $HOME/lib/$PNG_LIBNAME" >&5
+echo $ECHO_N "checking for $HOME/lib/$PNG_LIBNAME... $ECHO_C" >&6; }
 if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -8231,7 +8444,7 @@ else
   { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
 echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
    { (exit 1); exit 1; }; }
-if test -r "/lib/$PPM_LIBNAME"; then
+if test -r "$HOME/lib/$PNG_LIBNAME"; then
   eval "$as_ac_File=yes"
 else
   eval "$as_ac_File=no"
@@ -8241,14 +8454,14 @@ ac_res=`eval echo '${'$as_ac_File'}'`
 	       { echo "$as_me:$LINENO: result: $ac_res" >&5
 echo "${ECHO_T}$ac_res" >&6; }
 if test `eval echo '${'$as_ac_File'}'` = yes; then
-  PPM_LIBDIR=/lib 
+  PNG_LIBDIR=$HOME/lib 
 fi
 
 fi
-if test x$PPM_LIBDIR = x; then
-        as_ac_File=`echo "ac_cv_file_$HOME/lib/$PPM_LIBNAME" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $HOME/lib/$PPM_LIBNAME" >&5
-echo $ECHO_N "checking for $HOME/lib/$PPM_LIBNAME... $ECHO_C" >&6; }
+if test x$PNG_LIBDIR = x; then
+        as_ac_File=`echo "ac_cv_file_/sw/lib/$PNG_LIBNAME" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for /sw/lib/$PNG_LIBNAME" >&5
+echo $ECHO_N "checking for /sw/lib/$PNG_LIBNAME... $ECHO_C" >&6; }
 if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -8256,7 +8469,7 @@ else
   { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
 echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
    { (exit 1); exit 1; }; }
-if test -r "$HOME/lib/$PPM_LIBNAME"; then
+if test -r "/sw/lib/$PNG_LIBNAME"; then
   eval "$as_ac_File=yes"
 else
   eval "$as_ac_File=no"
@@ -8266,42 +8479,54 @@ ac_res=`eval echo '${'$as_ac_File'}'`
 	       { echo "$as_me:$LINENO: result: $ac_res" >&5
 echo "${ECHO_T}$ac_res" >&6; }
 if test `eval echo '${'$as_ac_File'}'` = yes; then
-  PPM_LIBDIR=$HOME/lib 
+  PNG_LIBDIR=/sw/lib 
 fi
 
 fi
+PNG_LIBNAME=`echo $PNG_LIBNAME | sed s/lib// | sed s/\.so//`
+PNG_PRESENT=no
+if test $PNG_INC_PRESENT = yes; then
+	if test x$PNG_LIBDIR != x; then
+		PNG_PRESENT=yes
+		PNG_LIBS=-l$PNG_LIBNAME
+		PNG_LDFLAGS="-L$PNG_LIBDIR $PNG_LIBS"
+		
+cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_PNG 1
+_ACEOF
+
+	fi
 fi
-PPM_LIBNAME=`echo $PPM_LIBNAME | sed s/lib// | sed s/\.so//`
 
 
 
 
-do_ppm=false
-if test x$PPM_INCDIR != x; then
-	if test x$PPM_LIBDIR != x; then
-		do_ppm=true
+do_png=false
+if test x$PNG_INCDIR != x; then
+	if test x$PNG_LIBDIR != x; then
+		do_png=true
 	fi
 fi
-if test $do_ppm = true; then
-	DO_PPM_LINE="INC_PPM   = -DINC_PPM"
-	DO_PPM_INCDIR="PPMINCDIR = -I$PPM_INCDIR"
-	DO_PPM_LIBDIR="PPMLIBDIR = -L$PPM_LIBDIR"
-	DO_PPM_LIBNAME="PPMLIB = -l$PPM_LIBNAME"
+if test $do_png = true; then
+	DO_PNG_LINE="INC_PNG   = -DINC_PNG"
+	DO_PNG_INCDIR="PNGINCDIR = -I$PNG_INCDIR"
+	DO_PNG_LIBDIR="PNGLIBDIR = -L$PNG_LIBDIR"
+	DO_PNG_LIBNAME="PNGLIB = -l$PNG_LIBNAME"
 else
 	echo "************************************************************************"
 	echo "Note: the -frames option is NOT enabled, because I could not find the "
-	echo "location of the PPM include file 'ppm.h' or library file"
-	echo "'libppm.a'.  Ncview uses the ppm package to dump out the frames viewed,"
+	echo "location of the PNG include file 'png.h' or library file"
+	echo "'libpng.so'.  Ncview uses the png package to dump out the frames viewed,"
 	echo "which is an easy way to make an mpeg video of the data if you want."
 	echo "If you do not want this feature, then don't worry about the lack"
-	echo "of ppm support.  If you DO want this, then you must tell me where to find"
-	echo "the ppm package by giving arguments to configure, as follows:"
-	echo "  ./configure -with-ppm_incdir=include_directory -with-ppm_libdir=library_directory"
+	echo "of png support.  If you DO want this, then you must install libpng, or tell "
+	echo "me where to find the png package by giving arguments to configure, as follows:"
+	echo "  ./configure -with-png_incdir=include_directory -with-png_libdir=library_directory"
 	echo "************************************************************************"
-	DO_PPM_LINE="#INC_PPM   = -DINC_PPM"
-	DO_PPM_INCDIR="#PPMINCDIR = -I$PPM_INCDIR"
-	DO_PPM_LIBDIR="#PPMLIBDIR = -I$PPM_LIBDIR"
-	DO_PPM_LIBNAME="#PPMLIB = -l$PPM_LIBNAME"
+	DO_PNG_LINE="#INC_PNG   = -DINC_PNG"
+	DO_PNG_INCDIR="#PNGINCDIR = -I$PNG_INCDIR"
+	DO_PNG_LIBDIR="#PNGLIBDIR = -I$PNG_LIBDIR"
+	DO_PNG_LIBNAME="#PNGLIB = -l$PNG_LIBNAME"
 fi
 
 
@@ -8404,10 +8629,19 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 # if it generally works or not.  Probably not.
 #----------------------------------------------------------------------------
 CC_TEST_SAME=$CC
-NETCDF_CC_TEST_SAME=$NETCDF_CC
+#-----------------------------------------------------------------------
+# Point of following obscure manipulations is that $CC can have multiple
+# words, for example, it could be "gcc -fPIC -lm". We want to keep only
+# the first word, so use 'set' and then take the first arg ($1).
+#-----------------------------------------------------------------------
+set $CC_TEST_SAME
+CC_TEST_SAME=$1
 if test x$CC_TEST_SAME = xcc; then
 	CC_TEST_SAME=gcc			
 fi
+NETCDF_CC_TEST_SAME=$NETCDF_CC
+set $NETCDF_CC_TEST_SAME
+NETCDF_CC_TEST_SAME=$1
 if test x$NETCDF_CC_TEST_SAME = xcc; then
 	NETCDF_CC_TEST_SAME=gcc
 fi
@@ -8444,7 +8678,7 @@ fi
 #	LIBS="-L/usr/local/lib -lnetcdf -L/home/pierce/lib -ludunits"
 # We want to convert this to -rpath flags suitable for the compiler, which would
 # have this format:
-#	"-Wl,R,/usr/local/lib -Wl,R,/home/pierce/lib"
+#	"-Wl,-rpath,/usr/local/lib -Wl,-rpath,/home/pierce/lib"
 #
 # As a safety check, I only do this for the GNU compiler, as I don't know if this
 # is anything like correct syntax for other compilers.  Note that this *does* work
@@ -8454,9 +8688,9 @@ fi
 if test x$ac_compiler_gnu = xyes; then
 	RPATH_FLAGS=""
 	for word in $UDUNITS2_LDFLAGS $NETCDF_LDFLAGS; do
-		if test `expr match $word -L/` -eq 3; then
+		if test `expr $word : -L/` -eq 3; then
 			RPDIR=`expr substr $word 3 999`;
-			RPATH_FLAGS="$RPATH_FLAGS -Wl,-R,$RPDIR"
+			RPATH_FLAGS="$RPATH_FLAGS -Wl,-rpath,$RPDIR"
 		fi
 	done
 	
@@ -9247,13 +9481,13 @@ ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
 DO_UDUNITS2_LIBNAME!$DO_UDUNITS2_LIBNAME$ac_delim
-PPM_INCDIR!$PPM_INCDIR$ac_delim
-PPM_LIBDIR!$PPM_LIBDIR$ac_delim
-PPM_LIBNAME!$PPM_LIBNAME$ac_delim
-DO_PPM_LINE!$DO_PPM_LINE$ac_delim
-DO_PPM_INCDIR!$DO_PPM_INCDIR$ac_delim
-DO_PPM_LIBDIR!$DO_PPM_LIBDIR$ac_delim
-DO_PPM_LIBNAME!$DO_PPM_LIBNAME$ac_delim
+PNG_CPPFLAGS!$PNG_CPPFLAGS$ac_delim
+PNG_LDFLAGS!$PNG_LDFLAGS$ac_delim
+PNG_LIBS!$PNG_LIBS$ac_delim
+DO_PNG_LINE!$DO_PNG_LINE$ac_delim
+DO_PNG_INCDIR!$DO_PNG_INCDIR$ac_delim
+DO_PNG_LIBDIR!$DO_PNG_LIBDIR$ac_delim
+DO_PNG_LIBNAME!$DO_PNG_LIBNAME$ac_delim
 PREFIX!$PREFIX$ac_delim
 X_INCLUDES!$X_INCLUDES$ac_delim
 RPATH_FLAGS!$RPATH_FLAGS$ac_delim
@@ -9865,16 +10099,17 @@ fi
 echo " "
 echo "----------- Configure Summary ----------"
 echo "Compiler:"
-echo "        CC                = $CC"
+echo "        CC                 = $CC"
+echo "        Runtime path flags = $RPATH_FLAGS"
 echo " "
-if test x"$with_udunits"x == "xnox"; then
-	echo "UDUNITS: not found"
-else
 echo "UDUNITS:"
+if test $do_udunits2 = true; then
 echo "        UDUNITS2_LIBS     = $UDUNITS2_LIBS"
 echo "        UDUNITS2_CPPFLAGS = $UDUNITS2_CPPFLAGS"
 echo "        UDUNITS2_LDFLAGS  = $UDUNITS2_LDFLAGS"
 echo " "
+else
+echo "        not found. Specify --with-udunits2_incdir=... and --with-udunits2_libdir=... flags to enable"
 fi
 
 echo " "
@@ -9892,4 +10127,14 @@ echo "        XAW_LIBS         = $XAW_LIBS"
 echo "        X_PRE_LIBS       = $X_PRE_LIBS"
 echo "        X_LIBS           = $X_LIBS"
 echo "        X_EXTRA_LIBS     = $X_EXTRA_LIBS"
+echo " "
+echo "PNG:"
+if test $do_png = true; then
+echo "        PNG_LIBS         = $PNG_LIBS"
+echo "        PNG_CPPFLAGS     = $PNG_CPPFLAGS"
+echo "        PNG_LDFLAGS      = $PNG_LDFLAGS"
+echo " "
+else
+echo "        not found. Install libpng, or specify --with-png_incdir=... and --with-png_libdir=... flags to enable"
+fi
 
diff --git a/autom4te.cache/requests b/autom4te.cache/requests
index 3599cba..3108973 100644
--- a/autom4te.cache/requests
+++ b/autom4te.cache/requests
@@ -29,14 +29,13 @@
                         '/usr/share/aclocal-1.10/substnot.m4',
                         '/usr/share/aclocal-1.10/tar.m4',
                         'm4macros/netcdf.m4',
-                        'm4macros/ppm.m4',
+                        'm4macros/png.m4',
                         'm4macros/udunits2.m4',
                         'configure.in'
                       ],
                       {
                         'm4_pattern_forbid' => 1,
                         'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1,
-                        'AC_PATH_PPM' => 1,
                         '_AM_SET_OPTION' => 1,
                         'AC_DEFUN' => 1,
                         'AC_PATH_UDUNITS2' => 1,
@@ -62,13 +61,14 @@
                         '_AM_SUBST_NOTMAKE' => 1,
                         'm4_pattern_allow' => 1,
                         '_AM_AUTOCONF_VERSION' => 1,
+                        'AC_PATH_PNG' => 1,
                         '_AM_MANGLE_OPTION' => 1,
                         'AM_CONDITIONAL' => 1,
                         'AM_SET_LEADING_DOT' => 1,
                         'AM_SET_DEPDIR' => 1,
                         '_AM_DEPENDENCIES' => 1,
-                        'AM_PROG_INSTALL_SH' => 1,
                         'm4_include' => 1,
+                        'AM_PROG_INSTALL_SH' => 1,
                         '_AC_AM_CONFIG_HEADER_HOOK' => 1,
                         'AU_DEFUN' => 1,
                         'AM_MAKE_INCLUDE' => 1
@@ -86,15 +86,15 @@
                         'configure.in'
                       ],
                       {
-                        '_LT_AC_TAGCONFIG' => 1,
                         'AM_PROG_F77_C_O' => 1,
-                        'AC_INIT' => 1,
+                        '_LT_AC_TAGCONFIG' => 1,
                         'm4_pattern_forbid' => 1,
+                        'AC_INIT' => 1,
                         'AC_CANONICAL_TARGET' => 1,
-                        'AC_SUBST' => 1,
                         'AC_CONFIG_LIBOBJ_DIR' => 1,
-                        'AC_FC_SRCEXT' => 1,
+                        'AC_SUBST' => 1,
                         'AC_CANONICAL_HOST' => 1,
+                        'AC_FC_SRCEXT' => 1,
                         'AC_PROG_LIBTOOL' => 1,
                         'AM_INIT_AUTOMAKE' => 1,
                         'AC_CONFIG_SUBDIRS' => 1,
@@ -102,8 +102,8 @@
                         'LT_CONFIG_LTDL_DIR' => 1,
                         'AC_REQUIRE_AUX_FILE' => 1,
                         'AC_CONFIG_LINKS' => 1,
-                        'm4_sinclude' => 1,
                         'LT_SUPPORTED_TAG' => 1,
+                        'm4_sinclude' => 1,
                         'AM_MAINTAINER_MODE' => 1,
                         'AM_GNU_GETTEXT_INTL_SUBDIR' => 1,
                         '_m4_warn' => 1,
@@ -120,11 +120,11 @@
                         'AH_OUTPUT' => 1,
                         '_AM_SUBST_NOTMAKE' => 1,
                         'AC_CONFIG_AUX_DIR' => 1,
-                        'sinclude' => 1,
-                        'AM_PROG_CC_C_O' => 1,
                         'm4_pattern_allow' => 1,
-                        'AC_CANONICAL_SYSTEM' => 1,
+                        'AM_PROG_CC_C_O' => 1,
+                        'sinclude' => 1,
                         'AM_CONDITIONAL' => 1,
+                        'AC_CANONICAL_SYSTEM' => 1,
                         'AC_CONFIG_HEADERS' => 1,
                         'AC_DEFINE_TRACE_LITERAL' => 1,
                         'm4_include' => 1,
diff --git a/autom4te.cache/traces.0 b/autom4te.cache/traces.0
index 3bbdf55..bd72b55 100644
--- a/autom4te.cache/traces.0
+++ b/autom4te.cache/traces.0
@@ -567,95 +567,106 @@ AC_SUBST(NETCDF_VERSION)
 AC_SUBST(NETCDF_CC)
 dnl
 ])
-m4trace:m4macros/ppm.m4:19: -1- AC_DEFUN([AC_PATH_PPM], [
-AC_ARG_WITH( ppm_incdir, [  --with-ppm_incdir=dir directory containing ppm includes],  PPM_INCDIR=$withval)
+m4trace:m4macros/png.m4:18: -1- AC_DEFUN([AC_PATH_PNG], [
+AC_ARG_WITH( png_incdir, [  --with-png_incdir=dir directory containing png includes],  PNG_INCDIR=$withval)
 dnl
 dnl
 dnl =================================================================================
-dnl check for ppm include directory
+dnl check for png include directory
 dnl
 err=0
-if test x$PPM_INCDIR != x; then
-        AC_CHECK_HEADER( $PPM_INCDIR/ppm.h,
-          echo "Using user-specified ppm include dir=$PPM_INCDIR",
+if test x$PNG_INCDIR != x; then
+        AC_CHECK_HEADER( $PNG_INCDIR/png.h,
+          echo "Using user-specified png include dir=$PNG_INCDIR",
           err=1 )
+	if test $err -eq 1; then
+		echo "--------------------------------------------------------------------------------"
+		echo "Error: You specified that the pnginclude directory is $PNG_INCDIR"
+		echo "but that directory does NOT have required png include file png.h."
+		echo "You must specify a directory that has the png include files"
+		echo "--------------------------------------------------------------------------------"
+		exit -1
+	fi
 fi
 if test $err -eq 1; then
-        echo "Error: user specified ppm include directory does not have ppm.h!"
+        echo "Error: user specified png include directory does not have png.h!"
         exit -1
 fi
-if test x$PPM_INCDIR = x; then
-        AC_CHECK_HEADER( /usr/local/include/ppm.h, PPM_INCDIR=/usr/local/include )
+if test x$PNG_INCDIR = x; then
+        AC_CHECK_HEADER( png.h, PNG_INCDIR=. )
+fi
+if test x$PNG_INCDIR = x; then
+        AC_CHECK_HEADER( /usr/local/include/png.h, PNG_INCDIR=/usr/local/include )
 fi
-if test x$PPM_INCDIR = x; then
-        AC_CHECK_HEADER( /usr/include/ppm.h, PPM_INCDIR=/usr/include )
+if test x$PNG_INCDIR = x; then
+        AC_CHECK_HEADER( /usr/include/png.h, PNG_INCDIR=/usr/include )
 fi
-if test x$PPM_INCDIR = x; then
-        AC_CHECK_HEADER( $HOME/include/ppm.h, PPM_INCDIR=$HOME/include )
+if test x$PNG_INCDIR = x; then
+        AC_CHECK_HEADER( $HOME/include/png.h, PNG_INCDIR=$HOME/include )
+fi
+if test x$PNG_INCDIR = x; then
+        AC_CHECK_HEADER( /sw/include/png.h, PNG_INCDIR=/sw/include )
 fi
 dnl
+PNG_INC_PRESENT=no
+if test x$PNG_INCDIR != x; then
+	PNG_INC_PRESENT=yes
+        PNG_CPPFLAGS=-I$PNG_INCDIR
+else
+	echo "** Could not find the png.h file, so -frames support will not be included  **"
+	echo "** Install the PNG library (and development headers) to fix this           **"
+fi
 dnl =================================================================================
-dnl check for ppm lib directory
+dnl check for png lib directory
 dnl
-PPM_LIBNAME=libppm.so
+PNG_LIBNAME=libpng.so
 dnl
-AC_ARG_WITH( ppm_libdir, [  --with-ppm_libdir=dir directory containing ppm library],  PPM_LIBDIR=$withval)
+AC_ARG_WITH( png_libdir, [  --with-png_libdir=dir directory containing png library],  PNG_LIBDIR=$withval)
 err=0
-if test x$PPM_LIBDIR != x; then
-        AC_CHECK_FILE( $PPM_LIBDIR/$PPM_LIBNAME,
-          echo "Using user-specified ppm library dir=$PPM_LIBDIR",
+if test x$PNG_LIBDIR != x; then
+        AC_CHECK_FILE( $PNG_LIBDIR/$PNG_LIBNAME,
+          echo "Using user-specified png library dir=$PNG_LIBDIR",
           err=1 )
 fi
 if test $err -eq 1; then
-        echo "Error: user specified ppm library directory does not have $PPM_LIBNAME !"
+        echo "Error: user specified png library directory does not have $PNG_LIBNAME !"
         exit -1
 fi
-if test x$PPM_LIBDIR = x; then
-	AC_CHECK_LIB( ppm, ppm_writeppm, PPM_LIBDIR=. )
+if test x$PNG_LIBDIR = x; then
+        AC_CHECK_LIB( png, png_write_png, PNG_LIBDIR=. )
 fi
-if test x$PPM_LIBDIR = x; then
-        AC_CHECK_FILE( /usr/local/lib/$PPM_LIBNAME, PPM_LIBDIR=/usr/local/lib )
+if test x$PNG_LIBDIR = x; then
+        AC_CHECK_FILE( /usr/local/lib/$PNG_LIBNAME, PNG_LIBDIR=/usr/local/lib )
 fi
-if test x$PPM_LIBDIR = x; then
-        AC_CHECK_FILE( /usr/lib/$PPM_LIBNAME, PPM_LIBDIR=/usr/lib )
+if test x$PNG_LIBDIR = x; then
+        AC_CHECK_FILE( /usr/lib/$PNG_LIBNAME, PNG_LIBDIR=/usr/lib )
 fi
-if test x$PPM_LIBDIR = x; then
-        AC_CHECK_FILE( /lib/$PPM_LIBNAME, PPM_LIBDIR=/lib )
+if test x$PNG_LIBDIR = x; then
+        AC_CHECK_FILE( /lib/$PNG_LIBNAME, PNG_LIBDIR=/lib )
 fi
-if test x$PPM_LIBDIR = x; then
-        AC_CHECK_FILE( $HOME/lib/$PPM_LIBNAME, PPM_LIBDIR=$HOME/lib )
+if test x$PNG_LIBDIR = x; then
+        AC_CHECK_FILE( $HOME/lib/$PNG_LIBNAME, PNG_LIBDIR=$HOME/lib )
 fi
-dnl
-dnl =================================================================================
-dnl If ppm library not found, try netpbm
-dnl
-if test x$PPM_LIBDIR = x; then
-PPM_LIBNAME=libnetpbm.so
-if test x$PPM_LIBDIR = x; then
-	AC_CHECK_LIB( netpbm, ppm_writeppm, PPM_LIBDIR=. )
+if test x$PNG_LIBDIR = x; then
+        AC_CHECK_FILE( /sw/lib/$PNG_LIBNAME, PNG_LIBDIR=/sw/lib )
 fi
-if test x$PPM_LIBDIR = x; then
-        AC_CHECK_FILE( /usr/local/lib/$PPM_LIBNAME, PPM_LIBDIR=/usr/local/lib )
-fi
-if test x$PPM_LIBDIR = x; then
-        AC_CHECK_FILE( /usr/lib/$PPM_LIBNAME, PPM_LIBDIR=/usr/lib )
-fi
-if test x$PPM_LIBDIR = x; then
-        AC_CHECK_FILE( /lib/$PPM_LIBNAME, PPM_LIBDIR=/lib )
-fi
-if test x$PPM_LIBDIR = x; then
-        AC_CHECK_FILE( $HOME/lib/$PPM_LIBNAME, PPM_LIBDIR=$HOME/lib )
-fi
-fi
-dnl
+PNG_LIBNAME=`echo $PNG_LIBNAME | sed s/lib// | sed s/\.so//`
 dnl
-PPM_LIBNAME=`echo $PPM_LIBNAME | sed s/lib// | sed s/\.so//`
+PNG_PRESENT=no
+if test $PNG_INC_PRESENT = yes; then
+	if test x$PNG_LIBDIR != x; then
+		PNG_PRESENT=yes
+		PNG_LIBS=-l$PNG_LIBNAME
+		PNG_LDFLAGS="-L$PNG_LIBDIR $PNG_LIBS"
+		AC_DEFINE([HAVE_PNG],1,[Define if you have PNG library])
+	fi
+fi
 dnl
 dnl Export our variables
 dnl
-AC_SUBST(PPM_INCDIR)
-AC_SUBST(PPM_LIBDIR)
-AC_SUBST(PPM_LIBNAME)
+AC_SUBST(PNG_CPPFLAGS)
+AC_SUBST(PNG_LDFLAGS)
+AC_SUBST(PNG_LIBS)
 dnl
 ])
 m4trace:m4macros/udunits2.m4:19: -1- AC_DEFUN([AC_PATH_UDUNITS2], [
@@ -703,8 +714,12 @@ if test x$UDUNITS2_INCDIR = x; then
         AC_CHECK_HEADER( /sw/include/udunits2.h, UDUNITS2_INCDIR=/sw/include )
 fi
 dnl
+UDUNITS2_INC_PRESENT=no
 if test x$UDUNITS2_INCDIR != x; then
+	UDUNITS2_INC_PRESENT=yes
         UDUNITS2_CPPFLAGS=-I$UDUNITS2_INCDIR
+else
+	echo "** Could not find the udunits2.h file, udunits support will not be included **"
 fi
 dnl =================================================================================
 dnl check for udunits2 lib directory
@@ -743,11 +758,13 @@ fi
 UDUNITS2_LIBNAME=`echo $UDUNITS2_LIBNAME | sed s/lib// | sed s/\.a//`
 dnl
 UDUNITS2_PRESENT=no
-if test x$UDUNITS2_LIBDIR != x; then
-	UDUNITS2_PRESENT=yes
-	UDUNITS2_LIBS=-l$UDUNITS2_LIBNAME
-        UDUNITS2_LDFLAGS="-L$UDUNITS2_LIBDIR $UDUNITS2_LIBS"
-	AC_DEFINE([HAVE_UDUNITS2],1,[Define if you have udunits-2 library])
+if test $UDUNITS2_INC_PRESENT = yes; then
+	if test x$UDUNITS2_LIBDIR != x; then
+		UDUNITS2_PRESENT=yes
+		UDUNITS2_LIBS=-l$UDUNITS2_LIBNAME
+		UDUNITS2_LDFLAGS="-L$UDUNITS2_LIBDIR $UDUNITS2_LIBS"
+		AC_DEFINE([HAVE_UDUNITS2],1,[Define if you have udunits-2 library])
+	fi
 fi
 dnl
 dnl ------------------------------------------------------------------------
@@ -770,6 +787,7 @@ if test $UDUNITS2_PRESENT = yes; then
 	echo "Expat libraries (needed by udunits2): $EXPAT_LIBS"
 	UDUNITS2_LDFLAGS="$UDUNITS2_LDFLAGS $LIBS"
 	LIBS=$LIBSsave
+	CFLAGS=$CFLAGSsave
 fi
 
 dnl Export our variables
@@ -951,83 +969,75 @@ m4trace:configure.in:66: -1- m4_pattern_allow([^X_LIBS$])
 m4trace:configure.in:66: -1- m4_pattern_allow([^X_EXTRA_LIBS$])
 m4trace:configure.in:81: -1- m4_pattern_allow([^HAVE_LIBXT$])
 m4trace:configure.in:82: -1- m4_pattern_allow([^HAVE_LIBXAW$])
-m4trace:configure.in:85: -1- m4_pattern_allow([^HAVE_LIBXAW3D$])
-m4trace:configure.in:94: -1- m4_pattern_allow([^XAW_LIBS$])
-m4trace:configure.in:108: -1- m4_pattern_allow([^HAVE_LIBX11$])
-m4trace:configure.in:114: -1- m4_pattern_allow([^X11_LIBS$])
-m4trace:configure.in:118: -1- AC_PATH_UDUNITS2
-m4trace:configure.in:118: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
+m4trace:configure.in:86: -1- m4_pattern_allow([^HAVE_LIBXAW3D$])
+m4trace:configure.in:101: -1- m4_pattern_allow([^XAW_LIBS$])
+m4trace:configure.in:116: -1- m4_pattern_allow([^HAVE_LIBX11$])
+m4trace:configure.in:122: -1- m4_pattern_allow([^X11_LIBS$])
+m4trace:configure.in:127: -1- AC_PATH_UDUNITS2
+m4trace:configure.in:127: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
 m4macros/udunits2.m4:19: AC_PATH_UDUNITS2 is expanded from...
-configure.in:118: the top level])
-m4trace:configure.in:118: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
+configure.in:127: the top level])
+m4trace:configure.in:127: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
 m4macros/udunits2.m4:19: AC_PATH_UDUNITS2 is expanded from...
-configure.in:118: the top level])
-m4trace:configure.in:118: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
+configure.in:127: the top level])
+m4trace:configure.in:127: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
 m4macros/udunits2.m4:19: AC_PATH_UDUNITS2 is expanded from...
-configure.in:118: the top level])
-m4trace:configure.in:118: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
+configure.in:127: the top level])
+m4trace:configure.in:127: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
 m4macros/udunits2.m4:19: AC_PATH_UDUNITS2 is expanded from...
-configure.in:118: the top level])
-m4trace:configure.in:118: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
+configure.in:127: the top level])
+m4trace:configure.in:127: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
 m4macros/udunits2.m4:19: AC_PATH_UDUNITS2 is expanded from...
-configure.in:118: the top level])
-m4trace:configure.in:118: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
+configure.in:127: the top level])
+m4trace:configure.in:127: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
 m4macros/udunits2.m4:19: AC_PATH_UDUNITS2 is expanded from...
-configure.in:118: the top level])
-m4trace:configure.in:118: -1- m4_pattern_allow([^HAVE_UDUNITS2$])
-m4trace:configure.in:118: -1- m4_pattern_allow([^HAVE_LIBEXPAT$])
-m4trace:configure.in:118: -1- m4_pattern_allow([^UDUNITS2_CPPFLAGS$])
-m4trace:configure.in:118: -1- m4_pattern_allow([^UDUNITS2_LDFLAGS$])
-m4trace:configure.in:118: -1- m4_pattern_allow([^UDUNITS2_LIBS$])
-m4trace:configure.in:151: -1- m4_pattern_allow([^DO_UDUNITS2_LINE$])
-m4trace:configure.in:152: -1- m4_pattern_allow([^DO_UDUNITS2_INCDIR$])
-m4trace:configure.in:153: -1- m4_pattern_allow([^DO_UDUNITS2_LIBDIR$])
-m4trace:configure.in:154: -1- m4_pattern_allow([^DO_UDUNITS2_LIBNAME$])
-m4trace:configure.in:157: -1- AC_PATH_PPM
-m4trace:configure.in:157: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
-m4macros/ppm.m4:19: AC_PATH_PPM is expanded from...
-configure.in:157: the top level])
-m4trace:configure.in:157: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
-m4macros/ppm.m4:19: AC_PATH_PPM is expanded from...
-configure.in:157: the top level])
-m4trace:configure.in:157: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
-m4macros/ppm.m4:19: AC_PATH_PPM is expanded from...
-configure.in:157: the top level])
-m4trace:configure.in:157: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
-m4macros/ppm.m4:19: AC_PATH_PPM is expanded from...
-configure.in:157: the top level])
-m4trace:configure.in:157: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
-m4macros/ppm.m4:19: AC_PATH_PPM is expanded from...
-configure.in:157: the top level])
-m4trace:configure.in:157: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
-m4macros/ppm.m4:19: AC_PATH_PPM is expanded from...
-configure.in:157: the top level])
-m4trace:configure.in:157: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
-m4macros/ppm.m4:19: AC_PATH_PPM is expanded from...
-configure.in:157: the top level])
-m4trace:configure.in:157: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
-m4macros/ppm.m4:19: AC_PATH_PPM is expanded from...
-configure.in:157: the top level])
-m4trace:configure.in:157: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
-m4macros/ppm.m4:19: AC_PATH_PPM is expanded from...
-configure.in:157: the top level])
-m4trace:configure.in:157: -1- m4_pattern_allow([^PPM_INCDIR$])
-m4trace:configure.in:157: -1- m4_pattern_allow([^PPM_LIBDIR$])
-m4trace:configure.in:157: -1- m4_pattern_allow([^PPM_LIBNAME$])
-m4trace:configure.in:185: -1- m4_pattern_allow([^DO_PPM_LINE$])
-m4trace:configure.in:186: -1- m4_pattern_allow([^DO_PPM_INCDIR$])
-m4trace:configure.in:187: -1- m4_pattern_allow([^DO_PPM_LIBDIR$])
-m4trace:configure.in:188: -1- m4_pattern_allow([^DO_PPM_LIBNAME$])
-m4trace:configure.in:191: -1- m4_pattern_allow([^INSTALL_PROGRAM$])
-m4trace:configure.in:191: -1- m4_pattern_allow([^INSTALL_SCRIPT$])
-m4trace:configure.in:191: -1- m4_pattern_allow([^INSTALL_DATA$])
-m4trace:configure.in:193: -1- m4_pattern_allow([^PREFIX$])
-m4trace:configure.in:194: -1- m4_pattern_allow([^CFLAGS$])
-m4trace:configure.in:195: -1- m4_pattern_allow([^CPPFLAGS$])
-m4trace:configure.in:196: -1- m4_pattern_allow([^LDFLAGS$])
-m4trace:configure.in:197: -1- m4_pattern_allow([^X_INCLUDES$])
-m4trace:configure.in:262: -1- m4_pattern_allow([^RPATH_FLAGS$])
-m4trace:configure.in:267: -1- m4_pattern_allow([^LIB@&t at OBJS$])
-m4trace:configure.in:267: -1- m4_pattern_allow([^LTLIBOBJS$])
-m4trace:configure.in:267: -1- _AC_AM_CONFIG_HEADER_HOOK([$ac_file])
-m4trace:configure.in:267: -1- _AM_OUTPUT_DEPENDENCY_COMMANDS
+configure.in:127: the top level])
+m4trace:configure.in:127: -1- m4_pattern_allow([^HAVE_UDUNITS2$])
+m4trace:configure.in:127: -1- m4_pattern_allow([^HAVE_LIBEXPAT$])
+m4trace:configure.in:127: -1- m4_pattern_allow([^UDUNITS2_CPPFLAGS$])
+m4trace:configure.in:127: -1- m4_pattern_allow([^UDUNITS2_LDFLAGS$])
+m4trace:configure.in:127: -1- m4_pattern_allow([^UDUNITS2_LIBS$])
+m4trace:configure.in:160: -1- m4_pattern_allow([^DO_UDUNITS2_LINE$])
+m4trace:configure.in:161: -1- m4_pattern_allow([^DO_UDUNITS2_INCDIR$])
+m4trace:configure.in:162: -1- m4_pattern_allow([^DO_UDUNITS2_LIBDIR$])
+m4trace:configure.in:163: -1- m4_pattern_allow([^DO_UDUNITS2_LIBNAME$])
+m4trace:configure.in:166: -1- AC_PATH_PNG
+m4trace:configure.in:166: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
+m4macros/png.m4:18: AC_PATH_PNG is expanded from...
+configure.in:166: the top level])
+m4trace:configure.in:166: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
+m4macros/png.m4:18: AC_PATH_PNG is expanded from...
+configure.in:166: the top level])
+m4trace:configure.in:166: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
+m4macros/png.m4:18: AC_PATH_PNG is expanded from...
+configure.in:166: the top level])
+m4trace:configure.in:166: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
+m4macros/png.m4:18: AC_PATH_PNG is expanded from...
+configure.in:166: the top level])
+m4trace:configure.in:166: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
+m4macros/png.m4:18: AC_PATH_PNG is expanded from...
+configure.in:166: the top level])
+m4trace:configure.in:166: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
+m4macros/png.m4:18: AC_PATH_PNG is expanded from...
+configure.in:166: the top level])
+m4trace:configure.in:166: -1- m4_pattern_allow([^HAVE_PNG$])
+m4trace:configure.in:166: -1- m4_pattern_allow([^PNG_CPPFLAGS$])
+m4trace:configure.in:166: -1- m4_pattern_allow([^PNG_LDFLAGS$])
+m4trace:configure.in:166: -1- m4_pattern_allow([^PNG_LIBS$])
+m4trace:configure.in:194: -1- m4_pattern_allow([^DO_PNG_LINE$])
+m4trace:configure.in:195: -1- m4_pattern_allow([^DO_PNG_INCDIR$])
+m4trace:configure.in:196: -1- m4_pattern_allow([^DO_PNG_LIBDIR$])
+m4trace:configure.in:197: -1- m4_pattern_allow([^DO_PNG_LIBNAME$])
+m4trace:configure.in:200: -1- m4_pattern_allow([^INSTALL_PROGRAM$])
+m4trace:configure.in:200: -1- m4_pattern_allow([^INSTALL_SCRIPT$])
+m4trace:configure.in:200: -1- m4_pattern_allow([^INSTALL_DATA$])
+m4trace:configure.in:202: -1- m4_pattern_allow([^PREFIX$])
+m4trace:configure.in:203: -1- m4_pattern_allow([^CFLAGS$])
+m4trace:configure.in:204: -1- m4_pattern_allow([^CPPFLAGS$])
+m4trace:configure.in:205: -1- m4_pattern_allow([^LDFLAGS$])
+m4trace:configure.in:206: -1- m4_pattern_allow([^X_INCLUDES$])
+m4trace:configure.in:280: -1- m4_pattern_allow([^RPATH_FLAGS$])
+m4trace:configure.in:285: -1- m4_pattern_allow([^LIB@&t at OBJS$])
+m4trace:configure.in:285: -1- m4_pattern_allow([^LTLIBOBJS$])
+m4trace:configure.in:285: -1- _AC_AM_CONFIG_HEADER_HOOK([$ac_file])
+m4trace:configure.in:285: -1- _AM_OUTPUT_DEPENDENCY_COMMANDS
diff --git a/autom4te.cache/traces.1 b/autom4te.cache/traces.1
index 2d13ef5..7878219 100644
--- a/autom4te.cache/traces.1
+++ b/autom4te.cache/traces.1
@@ -1,5 +1,5 @@
 m4trace:aclocal.m4:869: -1- m4_include([m4macros/netcdf.m4])
-m4trace:aclocal.m4:870: -1- m4_include([m4macros/ppm.m4])
+m4trace:aclocal.m4:870: -1- m4_include([m4macros/png.m4])
 m4trace:aclocal.m4:871: -1- m4_include([m4macros/udunits2.m4])
 m4trace:configure.in:10: -1- AC_INIT([ncview], [ncview_version], [dpierce at ucsd.edu])
 m4trace:configure.in:10: -1- m4_pattern_forbid([^_?A[CHUM]_])
@@ -365,175 +365,170 @@ m4trace:configure.in:82: -1- AH_OUTPUT([HAVE_LIBXAW], [/* Define to 1 if you hav
 #undef HAVE_LIBXAW])
 m4trace:configure.in:82: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBXAW])
 m4trace:configure.in:82: -1- m4_pattern_allow([^HAVE_LIBXAW$])
-m4trace:configure.in:85: -1- AH_OUTPUT([HAVE_LIBXAW3D], [/* Define to 1 if you have the `Xaw3d\' library (-lXaw3d). */
+m4trace:configure.in:86: -1- AH_OUTPUT([HAVE_LIBXAW3D], [/* Define to 1 if you have the `Xaw3d\' library (-lXaw3d). */
 #undef HAVE_LIBXAW3D])
-m4trace:configure.in:85: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBXAW3D])
-m4trace:configure.in:85: -1- m4_pattern_allow([^HAVE_LIBXAW3D$])
-m4trace:configure.in:87: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the <sys/types.h> header file. */
+m4trace:configure.in:86: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBXAW3D])
+m4trace:configure.in:86: -1- m4_pattern_allow([^HAVE_LIBXAW3D$])
+m4trace:configure.in:88: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the <sys/types.h> header file. */
 #undef HAVE_SYS_TYPES_H])
-m4trace:configure.in:87: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the <sys/stat.h> header file. */
+m4trace:configure.in:88: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the <sys/stat.h> header file. */
 #undef HAVE_SYS_STAT_H])
-m4trace:configure.in:87: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */
+m4trace:configure.in:88: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */
 #undef HAVE_STDLIB_H])
-m4trace:configure.in:87: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the <string.h> header file. */
+m4trace:configure.in:88: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the <string.h> header file. */
 #undef HAVE_STRING_H])
-m4trace:configure.in:87: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the <memory.h> header file. */
+m4trace:configure.in:88: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the <memory.h> header file. */
 #undef HAVE_MEMORY_H])
-m4trace:configure.in:87: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the <strings.h> header file. */
+m4trace:configure.in:88: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the <strings.h> header file. */
 #undef HAVE_STRINGS_H])
-m4trace:configure.in:87: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the <inttypes.h> header file. */
+m4trace:configure.in:88: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the <inttypes.h> header file. */
 #undef HAVE_INTTYPES_H])
-m4trace:configure.in:87: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the <stdint.h> header file. */
+m4trace:configure.in:88: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the <stdint.h> header file. */
 #undef HAVE_STDINT_H])
-m4trace:configure.in:87: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
+m4trace:configure.in:88: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
 #undef HAVE_UNISTD_H])
-m4trace:configure.in:94: -1- AC_SUBST([XAW_LIBS])
-m4trace:configure.in:94: -1- AC_SUBST_TRACE([XAW_LIBS])
-m4trace:configure.in:94: -1- m4_pattern_allow([^XAW_LIBS$])
-m4trace:configure.in:108: -1- AH_OUTPUT([HAVE_LIBX11], [/* Define to 1 if you have the `X11\' library (-lX11). */
+m4trace:configure.in:101: -1- AC_SUBST([XAW_LIBS])
+m4trace:configure.in:101: -1- AC_SUBST_TRACE([XAW_LIBS])
+m4trace:configure.in:101: -1- m4_pattern_allow([^XAW_LIBS$])
+m4trace:configure.in:116: -1- AH_OUTPUT([HAVE_LIBX11], [/* Define to 1 if you have the `X11\' library (-lX11). */
 #undef HAVE_LIBX11])
-m4trace:configure.in:108: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBX11])
-m4trace:configure.in:108: -1- m4_pattern_allow([^HAVE_LIBX11$])
-m4trace:configure.in:114: -1- AC_SUBST([X11_LIBS])
-m4trace:configure.in:114: -1- AC_SUBST_TRACE([X11_LIBS])
-m4trace:configure.in:114: -1- m4_pattern_allow([^X11_LIBS$])
-m4trace:configure.in:118: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
+m4trace:configure.in:116: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBX11])
+m4trace:configure.in:116: -1- m4_pattern_allow([^HAVE_LIBX11$])
+m4trace:configure.in:122: -1- AC_SUBST([X11_LIBS])
+m4trace:configure.in:122: -1- AC_SUBST_TRACE([X11_LIBS])
+m4trace:configure.in:122: -1- m4_pattern_allow([^X11_LIBS$])
+m4trace:configure.in:127: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
 m4macros/udunits2.m4:19: AC_PATH_UDUNITS2 is expanded from...
-configure.in:118: the top level])
-m4trace:configure.in:118: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
+configure.in:127: the top level])
+m4trace:configure.in:127: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
 m4macros/udunits2.m4:19: AC_PATH_UDUNITS2 is expanded from...
-configure.in:118: the top level])
-m4trace:configure.in:118: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
+configure.in:127: the top level])
+m4trace:configure.in:127: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
 m4macros/udunits2.m4:19: AC_PATH_UDUNITS2 is expanded from...
-configure.in:118: the top level])
-m4trace:configure.in:118: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
+configure.in:127: the top level])
+m4trace:configure.in:127: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
 m4macros/udunits2.m4:19: AC_PATH_UDUNITS2 is expanded from...
-configure.in:118: the top level])
-m4trace:configure.in:118: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
+configure.in:127: the top level])
+m4trace:configure.in:127: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
 m4macros/udunits2.m4:19: AC_PATH_UDUNITS2 is expanded from...
-configure.in:118: the top level])
-m4trace:configure.in:118: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
+configure.in:127: the top level])
+m4trace:configure.in:127: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
 m4macros/udunits2.m4:19: AC_PATH_UDUNITS2 is expanded from...
-configure.in:118: the top level])
-m4trace:configure.in:118: -1- AC_DEFINE_TRACE_LITERAL([HAVE_UDUNITS2])
-m4trace:configure.in:118: -1- m4_pattern_allow([^HAVE_UDUNITS2$])
-m4trace:configure.in:118: -1- AH_OUTPUT([HAVE_UDUNITS2], [/* Define if you have udunits-2 library */
+configure.in:127: the top level])
+m4trace:configure.in:127: -1- AC_DEFINE_TRACE_LITERAL([HAVE_UDUNITS2])
+m4trace:configure.in:127: -1- m4_pattern_allow([^HAVE_UDUNITS2$])
+m4trace:configure.in:127: -1- AH_OUTPUT([HAVE_UDUNITS2], [/* Define if you have udunits-2 library */
 #undef HAVE_UDUNITS2])
-m4trace:configure.in:118: -1- AH_OUTPUT([HAVE_LIBEXPAT], [/* Define to 1 if you have the `expat\' library (-lexpat). */
+m4trace:configure.in:127: -1- AH_OUTPUT([HAVE_LIBEXPAT], [/* Define to 1 if you have the `expat\' library (-lexpat). */
 #undef HAVE_LIBEXPAT])
-m4trace:configure.in:118: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBEXPAT])
-m4trace:configure.in:118: -1- m4_pattern_allow([^HAVE_LIBEXPAT$])
-m4trace:configure.in:118: -1- AC_SUBST([UDUNITS2_CPPFLAGS])
-m4trace:configure.in:118: -1- AC_SUBST_TRACE([UDUNITS2_CPPFLAGS])
-m4trace:configure.in:118: -1- m4_pattern_allow([^UDUNITS2_CPPFLAGS$])
-m4trace:configure.in:118: -1- AC_SUBST([UDUNITS2_LDFLAGS])
-m4trace:configure.in:118: -1- AC_SUBST_TRACE([UDUNITS2_LDFLAGS])
-m4trace:configure.in:118: -1- m4_pattern_allow([^UDUNITS2_LDFLAGS$])
-m4trace:configure.in:118: -1- AC_SUBST([UDUNITS2_LIBS])
-m4trace:configure.in:118: -1- AC_SUBST_TRACE([UDUNITS2_LIBS])
-m4trace:configure.in:118: -1- m4_pattern_allow([^UDUNITS2_LIBS$])
-m4trace:configure.in:151: -1- AC_SUBST([DO_UDUNITS2_LINE])
-m4trace:configure.in:151: -1- AC_SUBST_TRACE([DO_UDUNITS2_LINE])
-m4trace:configure.in:151: -1- m4_pattern_allow([^DO_UDUNITS2_LINE$])
-m4trace:configure.in:152: -1- AC_SUBST([DO_UDUNITS2_INCDIR])
-m4trace:configure.in:152: -1- AC_SUBST_TRACE([DO_UDUNITS2_INCDIR])
-m4trace:configure.in:152: -1- m4_pattern_allow([^DO_UDUNITS2_INCDIR$])
-m4trace:configure.in:153: -1- AC_SUBST([DO_UDUNITS2_LIBDIR])
-m4trace:configure.in:153: -1- AC_SUBST_TRACE([DO_UDUNITS2_LIBDIR])
-m4trace:configure.in:153: -1- m4_pattern_allow([^DO_UDUNITS2_LIBDIR$])
-m4trace:configure.in:154: -1- AC_SUBST([DO_UDUNITS2_LIBNAME])
-m4trace:configure.in:154: -1- AC_SUBST_TRACE([DO_UDUNITS2_LIBNAME])
-m4trace:configure.in:154: -1- m4_pattern_allow([^DO_UDUNITS2_LIBNAME$])
-m4trace:configure.in:157: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
-m4macros/ppm.m4:19: AC_PATH_PPM is expanded from...
-configure.in:157: the top level])
-m4trace:configure.in:157: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
-m4macros/ppm.m4:19: AC_PATH_PPM is expanded from...
-configure.in:157: the top level])
-m4trace:configure.in:157: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
-m4macros/ppm.m4:19: AC_PATH_PPM is expanded from...
-configure.in:157: the top level])
-m4trace:configure.in:157: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
-m4macros/ppm.m4:19: AC_PATH_PPM is expanded from...
-configure.in:157: the top level])
-m4trace:configure.in:157: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
-m4macros/ppm.m4:19: AC_PATH_PPM is expanded from...
-configure.in:157: the top level])
-m4trace:configure.in:157: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
-m4macros/ppm.m4:19: AC_PATH_PPM is expanded from...
-configure.in:157: the top level])
-m4trace:configure.in:157: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
-m4macros/ppm.m4:19: AC_PATH_PPM is expanded from...
-configure.in:157: the top level])
-m4trace:configure.in:157: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
-m4macros/ppm.m4:19: AC_PATH_PPM is expanded from...
-configure.in:157: the top level])
-m4trace:configure.in:157: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
-m4macros/ppm.m4:19: AC_PATH_PPM is expanded from...
-configure.in:157: the top level])
-m4trace:configure.in:157: -1- AC_SUBST([PPM_INCDIR])
-m4trace:configure.in:157: -1- AC_SUBST_TRACE([PPM_INCDIR])
-m4trace:configure.in:157: -1- m4_pattern_allow([^PPM_INCDIR$])
-m4trace:configure.in:157: -1- AC_SUBST([PPM_LIBDIR])
-m4trace:configure.in:157: -1- AC_SUBST_TRACE([PPM_LIBDIR])
-m4trace:configure.in:157: -1- m4_pattern_allow([^PPM_LIBDIR$])
-m4trace:configure.in:157: -1- AC_SUBST([PPM_LIBNAME])
-m4trace:configure.in:157: -1- AC_SUBST_TRACE([PPM_LIBNAME])
-m4trace:configure.in:157: -1- m4_pattern_allow([^PPM_LIBNAME$])
-m4trace:configure.in:185: -1- AC_SUBST([DO_PPM_LINE])
-m4trace:configure.in:185: -1- AC_SUBST_TRACE([DO_PPM_LINE])
-m4trace:configure.in:185: -1- m4_pattern_allow([^DO_PPM_LINE$])
-m4trace:configure.in:186: -1- AC_SUBST([DO_PPM_INCDIR])
-m4trace:configure.in:186: -1- AC_SUBST_TRACE([DO_PPM_INCDIR])
-m4trace:configure.in:186: -1- m4_pattern_allow([^DO_PPM_INCDIR$])
-m4trace:configure.in:187: -1- AC_SUBST([DO_PPM_LIBDIR])
-m4trace:configure.in:187: -1- AC_SUBST_TRACE([DO_PPM_LIBDIR])
-m4trace:configure.in:187: -1- m4_pattern_allow([^DO_PPM_LIBDIR$])
-m4trace:configure.in:188: -1- AC_SUBST([DO_PPM_LIBNAME])
-m4trace:configure.in:188: -1- AC_SUBST_TRACE([DO_PPM_LIBNAME])
-m4trace:configure.in:188: -1- m4_pattern_allow([^DO_PPM_LIBNAME$])
-m4trace:configure.in:191: -1- AC_REQUIRE_AUX_FILE([install-sh])
-m4trace:configure.in:191: -1- AC_SUBST([INSTALL_PROGRAM])
-m4trace:configure.in:191: -1- AC_SUBST_TRACE([INSTALL_PROGRAM])
-m4trace:configure.in:191: -1- m4_pattern_allow([^INSTALL_PROGRAM$])
-m4trace:configure.in:191: -1- AC_SUBST([INSTALL_SCRIPT])
-m4trace:configure.in:191: -1- AC_SUBST_TRACE([INSTALL_SCRIPT])
-m4trace:configure.in:191: -1- m4_pattern_allow([^INSTALL_SCRIPT$])
-m4trace:configure.in:191: -1- AC_SUBST([INSTALL_DATA])
-m4trace:configure.in:191: -1- AC_SUBST_TRACE([INSTALL_DATA])
-m4trace:configure.in:191: -1- m4_pattern_allow([^INSTALL_DATA$])
-m4trace:configure.in:193: -1- AC_SUBST([PREFIX])
-m4trace:configure.in:193: -1- AC_SUBST_TRACE([PREFIX])
-m4trace:configure.in:193: -1- m4_pattern_allow([^PREFIX$])
-m4trace:configure.in:194: -1- AC_SUBST([CFLAGS])
-m4trace:configure.in:194: -1- AC_SUBST_TRACE([CFLAGS])
-m4trace:configure.in:194: -1- m4_pattern_allow([^CFLAGS$])
-m4trace:configure.in:195: -1- AC_SUBST([CPPFLAGS])
-m4trace:configure.in:195: -1- AC_SUBST_TRACE([CPPFLAGS])
-m4trace:configure.in:195: -1- m4_pattern_allow([^CPPFLAGS$])
-m4trace:configure.in:196: -1- AC_SUBST([LDFLAGS])
-m4trace:configure.in:196: -1- AC_SUBST_TRACE([LDFLAGS])
-m4trace:configure.in:196: -1- m4_pattern_allow([^LDFLAGS$])
-m4trace:configure.in:197: -1- AC_SUBST([X_INCLUDES])
-m4trace:configure.in:197: -1- AC_SUBST_TRACE([X_INCLUDES])
-m4trace:configure.in:197: -1- m4_pattern_allow([^X_INCLUDES$])
-m4trace:configure.in:262: -1- AC_SUBST([RPATH_FLAGS])
-m4trace:configure.in:262: -1- AC_SUBST_TRACE([RPATH_FLAGS])
-m4trace:configure.in:262: -1- m4_pattern_allow([^RPATH_FLAGS$])
-m4trace:configure.in:266: -1- AC_CONFIG_FILES([Makefile src/Makefile])
-m4trace:configure.in:267: -1- AC_SUBST([LIB@&t at OBJS], [$ac_libobjs])
-m4trace:configure.in:267: -1- AC_SUBST_TRACE([LIB@&t at OBJS])
-m4trace:configure.in:267: -1- m4_pattern_allow([^LIB@&t at OBJS$])
-m4trace:configure.in:267: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
-m4trace:configure.in:267: -1- AC_SUBST_TRACE([LTLIBOBJS])
-m4trace:configure.in:267: -1- m4_pattern_allow([^LTLIBOBJS$])
-m4trace:configure.in:267: -1- AC_SUBST_TRACE([top_builddir])
-m4trace:configure.in:267: -1- AC_SUBST_TRACE([srcdir])
-m4trace:configure.in:267: -1- AC_SUBST_TRACE([abs_srcdir])
-m4trace:configure.in:267: -1- AC_SUBST_TRACE([top_srcdir])
-m4trace:configure.in:267: -1- AC_SUBST_TRACE([abs_top_srcdir])
-m4trace:configure.in:267: -1- AC_SUBST_TRACE([builddir])
-m4trace:configure.in:267: -1- AC_SUBST_TRACE([abs_builddir])
-m4trace:configure.in:267: -1- AC_SUBST_TRACE([abs_top_builddir])
-m4trace:configure.in:267: -1- AC_SUBST_TRACE([INSTALL])
-m4trace:configure.in:267: -1- AC_SUBST_TRACE([MKDIR_P])
+m4trace:configure.in:127: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBEXPAT])
+m4trace:configure.in:127: -1- m4_pattern_allow([^HAVE_LIBEXPAT$])
+m4trace:configure.in:127: -1- AC_SUBST([UDUNITS2_CPPFLAGS])
+m4trace:configure.in:127: -1- AC_SUBST_TRACE([UDUNITS2_CPPFLAGS])
+m4trace:configure.in:127: -1- m4_pattern_allow([^UDUNITS2_CPPFLAGS$])
+m4trace:configure.in:127: -1- AC_SUBST([UDUNITS2_LDFLAGS])
+m4trace:configure.in:127: -1- AC_SUBST_TRACE([UDUNITS2_LDFLAGS])
+m4trace:configure.in:127: -1- m4_pattern_allow([^UDUNITS2_LDFLAGS$])
+m4trace:configure.in:127: -1- AC_SUBST([UDUNITS2_LIBS])
+m4trace:configure.in:127: -1- AC_SUBST_TRACE([UDUNITS2_LIBS])
+m4trace:configure.in:127: -1- m4_pattern_allow([^UDUNITS2_LIBS$])
+m4trace:configure.in:160: -1- AC_SUBST([DO_UDUNITS2_LINE])
+m4trace:configure.in:160: -1- AC_SUBST_TRACE([DO_UDUNITS2_LINE])
+m4trace:configure.in:160: -1- m4_pattern_allow([^DO_UDUNITS2_LINE$])
+m4trace:configure.in:161: -1- AC_SUBST([DO_UDUNITS2_INCDIR])
+m4trace:configure.in:161: -1- AC_SUBST_TRACE([DO_UDUNITS2_INCDIR])
+m4trace:configure.in:161: -1- m4_pattern_allow([^DO_UDUNITS2_INCDIR$])
+m4trace:configure.in:162: -1- AC_SUBST([DO_UDUNITS2_LIBDIR])
+m4trace:configure.in:162: -1- AC_SUBST_TRACE([DO_UDUNITS2_LIBDIR])
+m4trace:configure.in:162: -1- m4_pattern_allow([^DO_UDUNITS2_LIBDIR$])
+m4trace:configure.in:163: -1- AC_SUBST([DO_UDUNITS2_LIBNAME])
+m4trace:configure.in:163: -1- AC_SUBST_TRACE([DO_UDUNITS2_LIBNAME])
+m4trace:configure.in:163: -1- m4_pattern_allow([^DO_UDUNITS2_LIBNAME$])
+m4trace:configure.in:166: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
+m4macros/png.m4:18: AC_PATH_PNG is expanded from...
+configure.in:166: the top level])
+m4trace:configure.in:166: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
+m4macros/png.m4:18: AC_PATH_PNG is expanded from...
+configure.in:166: the top level])
+m4trace:configure.in:166: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
+m4macros/png.m4:18: AC_PATH_PNG is expanded from...
+configure.in:166: the top level])
+m4trace:configure.in:166: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
+m4macros/png.m4:18: AC_PATH_PNG is expanded from...
+configure.in:166: the top level])
+m4trace:configure.in:166: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
+m4macros/png.m4:18: AC_PATH_PNG is expanded from...
+configure.in:166: the top level])
+m4trace:configure.in:166: -1- _m4_warn([cross], [cannot check for file existence when cross compiling], [../../lib/autoconf/general.m4:2491: AC_CHECK_FILE is expanded from...
+m4macros/png.m4:18: AC_PATH_PNG is expanded from...
+configure.in:166: the top level])
+m4trace:configure.in:166: -1- AC_DEFINE_TRACE_LITERAL([HAVE_PNG])
+m4trace:configure.in:166: -1- m4_pattern_allow([^HAVE_PNG$])
+m4trace:configure.in:166: -1- AH_OUTPUT([HAVE_PNG], [/* Define if you have PNG library */
+#undef HAVE_PNG])
+m4trace:configure.in:166: -1- AC_SUBST([PNG_CPPFLAGS])
+m4trace:configure.in:166: -1- AC_SUBST_TRACE([PNG_CPPFLAGS])
+m4trace:configure.in:166: -1- m4_pattern_allow([^PNG_CPPFLAGS$])
+m4trace:configure.in:166: -1- AC_SUBST([PNG_LDFLAGS])
+m4trace:configure.in:166: -1- AC_SUBST_TRACE([PNG_LDFLAGS])
+m4trace:configure.in:166: -1- m4_pattern_allow([^PNG_LDFLAGS$])
+m4trace:configure.in:166: -1- AC_SUBST([PNG_LIBS])
+m4trace:configure.in:166: -1- AC_SUBST_TRACE([PNG_LIBS])
+m4trace:configure.in:166: -1- m4_pattern_allow([^PNG_LIBS$])
+m4trace:configure.in:194: -1- AC_SUBST([DO_PNG_LINE])
+m4trace:configure.in:194: -1- AC_SUBST_TRACE([DO_PNG_LINE])
+m4trace:configure.in:194: -1- m4_pattern_allow([^DO_PNG_LINE$])
+m4trace:configure.in:195: -1- AC_SUBST([DO_PNG_INCDIR])
+m4trace:configure.in:195: -1- AC_SUBST_TRACE([DO_PNG_INCDIR])
+m4trace:configure.in:195: -1- m4_pattern_allow([^DO_PNG_INCDIR$])
+m4trace:configure.in:196: -1- AC_SUBST([DO_PNG_LIBDIR])
+m4trace:configure.in:196: -1- AC_SUBST_TRACE([DO_PNG_LIBDIR])
+m4trace:configure.in:196: -1- m4_pattern_allow([^DO_PNG_LIBDIR$])
+m4trace:configure.in:197: -1- AC_SUBST([DO_PNG_LIBNAME])
+m4trace:configure.in:197: -1- AC_SUBST_TRACE([DO_PNG_LIBNAME])
+m4trace:configure.in:197: -1- m4_pattern_allow([^DO_PNG_LIBNAME$])
+m4trace:configure.in:200: -1- AC_REQUIRE_AUX_FILE([install-sh])
+m4trace:configure.in:200: -1- AC_SUBST([INSTALL_PROGRAM])
+m4trace:configure.in:200: -1- AC_SUBST_TRACE([INSTALL_PROGRAM])
+m4trace:configure.in:200: -1- m4_pattern_allow([^INSTALL_PROGRAM$])
+m4trace:configure.in:200: -1- AC_SUBST([INSTALL_SCRIPT])
+m4trace:configure.in:200: -1- AC_SUBST_TRACE([INSTALL_SCRIPT])
+m4trace:configure.in:200: -1- m4_pattern_allow([^INSTALL_SCRIPT$])
+m4trace:configure.in:200: -1- AC_SUBST([INSTALL_DATA])
+m4trace:configure.in:200: -1- AC_SUBST_TRACE([INSTALL_DATA])
+m4trace:configure.in:200: -1- m4_pattern_allow([^INSTALL_DATA$])
+m4trace:configure.in:202: -1- AC_SUBST([PREFIX])
+m4trace:configure.in:202: -1- AC_SUBST_TRACE([PREFIX])
+m4trace:configure.in:202: -1- m4_pattern_allow([^PREFIX$])
+m4trace:configure.in:203: -1- AC_SUBST([CFLAGS])
+m4trace:configure.in:203: -1- AC_SUBST_TRACE([CFLAGS])
+m4trace:configure.in:203: -1- m4_pattern_allow([^CFLAGS$])
+m4trace:configure.in:204: -1- AC_SUBST([CPPFLAGS])
+m4trace:configure.in:204: -1- AC_SUBST_TRACE([CPPFLAGS])
+m4trace:configure.in:204: -1- m4_pattern_allow([^CPPFLAGS$])
+m4trace:configure.in:205: -1- AC_SUBST([LDFLAGS])
+m4trace:configure.in:205: -1- AC_SUBST_TRACE([LDFLAGS])
+m4trace:configure.in:205: -1- m4_pattern_allow([^LDFLAGS$])
+m4trace:configure.in:206: -1- AC_SUBST([X_INCLUDES])
+m4trace:configure.in:206: -1- AC_SUBST_TRACE([X_INCLUDES])
+m4trace:configure.in:206: -1- m4_pattern_allow([^X_INCLUDES$])
+m4trace:configure.in:280: -1- AC_SUBST([RPATH_FLAGS])
+m4trace:configure.in:280: -1- AC_SUBST_TRACE([RPATH_FLAGS])
+m4trace:configure.in:280: -1- m4_pattern_allow([^RPATH_FLAGS$])
+m4trace:configure.in:284: -1- AC_CONFIG_FILES([Makefile src/Makefile])
+m4trace:configure.in:285: -1- AC_SUBST([LIB@&t at OBJS], [$ac_libobjs])
+m4trace:configure.in:285: -1- AC_SUBST_TRACE([LIB@&t at OBJS])
+m4trace:configure.in:285: -1- m4_pattern_allow([^LIB@&t at OBJS$])
+m4trace:configure.in:285: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
+m4trace:configure.in:285: -1- AC_SUBST_TRACE([LTLIBOBJS])
+m4trace:configure.in:285: -1- m4_pattern_allow([^LTLIBOBJS$])
+m4trace:configure.in:285: -1- AC_SUBST_TRACE([top_builddir])
+m4trace:configure.in:285: -1- AC_SUBST_TRACE([srcdir])
+m4trace:configure.in:285: -1- AC_SUBST_TRACE([abs_srcdir])
+m4trace:configure.in:285: -1- AC_SUBST_TRACE([top_srcdir])
+m4trace:configure.in:285: -1- AC_SUBST_TRACE([abs_top_srcdir])
+m4trace:configure.in:285: -1- AC_SUBST_TRACE([builddir])
+m4trace:configure.in:285: -1- AC_SUBST_TRACE([abs_builddir])
+m4trace:configure.in:285: -1- AC_SUBST_TRACE([abs_top_builddir])
+m4trace:configure.in:285: -1- AC_SUBST_TRACE([INSTALL])
+m4trace:configure.in:285: -1- AC_SUBST_TRACE([MKDIR_P])
diff --git a/config.h b/config.h
deleted file mode 100644
index fac723d..0000000
--- a/config.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/* config.h.  Generated from config.h.in by configure.  */
-/* config.h.in.  Generated from configure.in by autoheader.  */
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#define HAVE_INTTYPES_H 1
-
-/* Define to 1 if you have the `expat' library (-lexpat). */
-#define HAVE_LIBEXPAT 1
-
-/* Define to 1 if you have the `X11' library (-lX11). */
-#define HAVE_LIBX11 1
-
-/* Define to 1 if you have the `Xaw' library (-lXaw). */
-#define HAVE_LIBXAW 1
-
-/* Define to 1 if you have the `Xaw3d' library (-lXaw3d). */
-/* #undef HAVE_LIBXAW3D */
-
-/* Define to 1 if you have the `Xt' library (-lXt). */
-#define HAVE_LIBXT 1
-
-/* Define to 1 if you have the <memory.h> header file. */
-#define HAVE_MEMORY_H 1
-
-/* Define if you have the NETCDF library, either v3 or v4 */
-#define HAVE_NETCDF 1
-
-/* Define if you have version 4 of the NETCDF library */
-#define HAVE_NETCDF4 1
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#define HAVE_STDINT_H 1
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define to 1 if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H 1
-
-/* Define to 1 if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#define HAVE_SYS_STAT_H 1
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#define HAVE_SYS_TYPES_H 1
-
-/* Define if you have udunits-2 library */
-#define HAVE_UDUNITS2 1
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H 1
-
-/* Name of package */
-#define PACKAGE "ncview"
-
-/* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT "dpierce at ucsd.edu"
-
-/* Define to the full name of this package. */
-#define PACKAGE_NAME "ncview"
-
-/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "ncview 2.0.0"
-
-/* Define to the one symbol short name of this package. */
-#define PACKAGE_TARNAME "ncview"
-
-/* Define to the version of this package. */
-#define PACKAGE_VERSION "2.0.0"
-
-/* Define to 1 if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-/* Version number of package */
-#define VERSION "2.0.0"
-
-/* Define to 1 if the X Window System is missing or not being used. */
-/* #undef X_DISPLAY_MISSING */
diff --git a/config.h.in b/config.h.in
index 43e6d78..54fc044 100644
--- a/config.h.in
+++ b/config.h.in
@@ -27,6 +27,9 @@
 /* Define if you have version 4 of the NETCDF library */
 #undef HAVE_NETCDF4
 
+/* Define if you have PNG library */
+#undef HAVE_PNG
+
 /* Define to 1 if you have the <stdint.h> header file. */
 #undef HAVE_STDINT_H
 
diff --git a/config.h.in~ b/config.h.in~
index 92c0622..43e6d78 100644
--- a/config.h.in~
+++ b/config.h.in~
@@ -3,6 +3,9 @@
 /* Define to 1 if you have the <inttypes.h> header file. */
 #undef HAVE_INTTYPES_H
 
+/* Define to 1 if you have the `expat' library (-lexpat). */
+#undef HAVE_LIBEXPAT
+
 /* Define to 1 if you have the `X11' library (-lX11). */
 #undef HAVE_LIBX11
 
diff --git a/config.log b/config.log
deleted file mode 100644
index 2bcf3f1..0000000
--- a/config.log
+++ /dev/null
@@ -1,1304 +0,0 @@
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by ncview configure 2.0.0, which was
-generated by GNU Autoconf 2.61.  Invocation command line was
-
-  $ ./configure --prefix=/home/pierce
-
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = cirrus
-uname -m = x86_64
-uname -r = 2.6.24-27-server
-uname -s = Linux
-uname -v = #1 SMP Wed Jan 27 23:39:33 UTC 2010
-
-/usr/bin/uname -p = unknown
-/bin/uname -X     = unknown
-
-/bin/arch              = unknown
-/usr/bin/arch -k       = unknown
-/usr/convex/getsysinfo = unknown
-/usr/bin/hostinfo      = unknown
-/bin/machine           = unknown
-/usr/bin/oslevel       = unknown
-/bin/universe          = unknown
-
-PATH: .
-PATH: /home/pierce/bin
-PATH: /home/pierce/bin/shellscripts
-PATH: /home/pierce/src/packages/plot_graph/gmt/GMT4.1.3/GMT4.1.3/bin
-PATH: /usr/local/mpich2/bin
-PATH: /home/pierce/src/packages/data/srb/SRB3_4_2/utilities/bin
-PATH: /usr/kerberos/bin
-PATH: /usr/local/bin
-PATH: /bin
-PATH: /usr/bin
-PATH: /usr/X11R6/bin
-PATH: /usr/pgi/linux86-64/5.2/bin
-PATH: /home/pierce/src/packages/data/nco/nco-2.2.0/bin
-PATH: /sbin
-PATH: /home/pierce/src/packages/data/grib/decoders/decoders-3.0.2/bin
-PATH: /home/pierce/src/packages/num_analysis/ncl/ncl_5.1.1/bin
-PATH: /opt/kde3/bin
-PATH: /usr/local/matlab/bin
-PATH: /home/pierce/src/packages/compilers/java/jdk1.5.0_07/bin
-PATH: /usr/local/netcdf-4/bin
-
-
-## ----------- ##
-## Core tests. ##
-## ----------- ##
-
-configure:1794: checking for nc-config
-configure:1810: found /home/pierce/bin/nc-config
-configure:1822: result: yes
-configure:1953: checking for cc
-configure:1969: found /usr/bin/cc
-configure:1980: result: cc
-configure:2016: checking for C compiler version
-configure:2023: cc --version >&5
-cc (GCC) 4.2.4 (Ubuntu 4.2.4-1ubuntu4)
-Copyright (C) 2007 Free Software Foundation, Inc.
-This is free software; see the source for copying conditions.  There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-configure:2026: $? = 0
-configure:2033: cc -v >&5
-Using built-in specs.
-Target: x86_64-linux-gnu
-Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
-Thread model: posix
-gcc version 4.2.4 (Ubuntu 4.2.4-1ubuntu4)
-configure:2036: $? = 0
-configure:2043: cc -V >&5
-cc: '-V' option must have argument
-configure:2046: $? = 1
-configure:2069: checking for C compiler default output file name
-configure:2096: cc    conftest.c  >&5
-configure:2099: $? = 0
-configure:2137: result: a.out
-configure:2154: checking whether the C compiler works
-configure:2164: ./a.out
-configure:2167: $? = 0
-configure:2184: result: yes
-configure:2191: checking whether we are cross compiling
-configure:2193: result: no
-configure:2196: checking for suffix of executables
-configure:2203: cc -o conftest    conftest.c  >&5
-configure:2206: $? = 0
-configure:2230: result: 
-configure:2236: checking for suffix of object files
-configure:2262: cc -c   conftest.c >&5
-configure:2265: $? = 0
-configure:2288: result: o
-configure:2292: checking whether we are using the GNU C compiler
-configure:2321: cc -c   conftest.c >&5
-configure:2327: $? = 0
-configure:2344: result: yes
-configure:2349: checking whether cc accepts -g
-configure:2379: cc -c -g  conftest.c >&5
-configure:2385: $? = 0
-configure:2484: result: yes
-configure:2501: checking for cc option to accept ISO C89
-configure:2575: cc  -c -g -O2  conftest.c >&5
-configure:2581: $? = 0
-configure:2604: result: none needed
-configure:2623: checking for library containing strerror
-configure:2664: cc -o conftest -g -O2   conftest.c  >&5
-configure:2670: $? = 0
-configure:2698: result: none required
-configure:2711: checking how to run the C preprocessor
-configure:2751: cc -E  conftest.c
-configure:2757: $? = 0
-configure:2788: cc -E  conftest.c
-conftest.c:10:28: error: ac_nonexistent.h: No such file or directory
-configure:2794: $? = 1
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "ncview"
-| #define PACKAGE_TARNAME "ncview"
-| #define PACKAGE_VERSION "2.0.0"
-| #define PACKAGE_STRING "ncview 2.0.0"
-| #define PACKAGE_BUGREPORT "dpierce at ucsd.edu"
-| #define HAVE_NETCDF 1
-| #define HAVE_NETCDF4 1
-| /* end confdefs.h.  */
-| #include <ac_nonexistent.h>
-configure:2827: result: cc -E
-configure:2856: cc -E  conftest.c
-configure:2862: $? = 0
-configure:2893: cc -E  conftest.c
-conftest.c:10:28: error: ac_nonexistent.h: No such file or directory
-configure:2899: $? = 1
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "ncview"
-| #define PACKAGE_TARNAME "ncview"
-| #define PACKAGE_VERSION "2.0.0"
-| #define PACKAGE_STRING "ncview 2.0.0"
-| #define PACKAGE_BUGREPORT "dpierce at ucsd.edu"
-| #define HAVE_NETCDF 1
-| #define HAVE_NETCDF4 1
-| /* end confdefs.h.  */
-| #include <ac_nonexistent.h>
-configure:2937: checking for grep that handles long lines and -e
-configure:3011: result: /bin/grep
-configure:3016: checking for egrep
-configure:3094: result: /bin/grep -E
-configure:3099: checking for ANSI C header files
-configure:3129: cc -c -g -O2  conftest.c >&5
-configure:3135: $? = 0
-configure:3234: cc -o conftest -g -O2   conftest.c  >&5
-configure:3237: $? = 0
-configure:3243: ./conftest
-configure:3246: $? = 0
-configure:3263: result: yes
-configure:3323: checking for a BSD-compatible install
-configure:3379: result: /usr/bin/install -c
-configure:3390: checking whether build environment is sane
-configure:3433: result: yes
-configure:3461: checking for a thread-safe mkdir -p
-configure:3500: result: /bin/mkdir -p
-configure:3513: checking for gawk
-configure:3543: result: no
-configure:3513: checking for mawk
-configure:3529: found /usr/bin/mawk
-configure:3540: result: mawk
-configure:3551: checking whether make sets $(MAKE)
-configure:3572: result: yes
-configure:3602: checking for style of include used by make
-configure:3630: result: GNU
-configure:3823: checking dependency style of cc
-configure:3914: result: gcc3
-configure:3931: checking for X
-configure:4101: cc -o conftest -g -O2   conftest.c -lX11  >&5
-configure:4107: $? = 0
-configure:4166: result: libraries , headers 
-configure:4351: cc -o conftest -g -O2   conftest.c   -lX11 >&5
-configure:4357: $? = 0
-configure:4514: checking for gethostbyname
-configure:4570: cc -o conftest -g -O2   conftest.c  >&5
-configure:4576: $? = 0
-configure:4593: result: yes
-configure:4738: checking for connect
-configure:4794: cc -o conftest -g -O2   conftest.c  >&5
-configure:4800: $? = 0
-configure:4817: result: yes
-configure:4889: checking for remove
-configure:4945: cc -o conftest -g -O2   conftest.c  >&5
-configure:4951: $? = 0
-configure:4968: result: yes
-configure:5040: checking for shmat
-configure:5096: cc -o conftest -g -O2   conftest.c  >&5
-configure:5102: $? = 0
-configure:5119: result: yes
-configure:5200: checking for IceConnectionNumber in -lICE
-configure:5235: cc -o conftest -g -O2   conftest.c -lICE   >&5
-configure:5241: $? = 0
-configure:5259: result: yes
-configure:5281: checking for the Athena widgets
-configure:5283: result: 
-configure:5286: checking for XtWindow in -lXt
-configure:5321: cc -o conftest    conftest.c -lXt   >&5
-configure:5327: $? = 0
-configure:5345: result: yes
-configure:5359: checking for XawScrollbarSetThumb in -lXaw
-configure:5394: cc -o conftest    conftest.c -lXaw  -lXt  >&5
-configure:5400: $? = 0
-configure:5418: result: yes
-configure:5521: checking for sys/types.h
-configure:5542: cc -c   conftest.c >&5
-configure:5548: $? = 0
-configure:5564: result: yes
-configure:5521: checking for sys/stat.h
-configure:5542: cc -c   conftest.c >&5
-configure:5548: $? = 0
-configure:5564: result: yes
-configure:5521: checking for stdlib.h
-configure:5542: cc -c   conftest.c >&5
-configure:5548: $? = 0
-configure:5564: result: yes
-configure:5521: checking for string.h
-configure:5542: cc -c   conftest.c >&5
-configure:5548: $? = 0
-configure:5564: result: yes
-configure:5521: checking for memory.h
-configure:5542: cc -c   conftest.c >&5
-configure:5548: $? = 0
-configure:5564: result: yes
-configure:5521: checking for strings.h
-configure:5542: cc -c   conftest.c >&5
-configure:5548: $? = 0
-configure:5564: result: yes
-configure:5521: checking for inttypes.h
-configure:5542: cc -c   conftest.c >&5
-configure:5548: $? = 0
-configure:5564: result: yes
-configure:5521: checking for stdint.h
-configure:5542: cc -c   conftest.c >&5
-configure:5548: $? = 0
-configure:5564: result: yes
-configure:5521: checking for unistd.h
-configure:5542: cc -c   conftest.c >&5
-configure:5548: $? = 0
-configure:5564: result: yes
-configure:5586: checking X11/Intrinsic.h usability
-configure:5603: cc -c   conftest.c >&5
-configure:5609: $? = 0
-configure:5623: result: yes
-configure:5627: checking X11/Intrinsic.h presence
-configure:5642: cc -E  conftest.c
-configure:5648: $? = 0
-configure:5662: result: yes
-configure:5695: checking for X11/Intrinsic.h
-configure:5702: result: yes
-configure:5723: checking X11/Xaw/Simple.h usability
-configure:5740: cc -c   conftest.c >&5
-configure:5746: $? = 0
-configure:5760: result: yes
-configure:5764: checking X11/Xaw/Simple.h presence
-configure:5779: cc -E  conftest.c
-configure:5785: $? = 0
-configure:5799: result: yes
-configure:5832: checking for X11/Xaw/Simple.h
-configure:5839: result: yes
-configure:5869: checking for X11 library
-configure:5871: result: 
-configure:5874: checking for XPutImage in -lX11
-configure:5909: cc -o conftest    conftest.c -lX11   >&5
-configure:5915: $? = 0
-configure:5933: result: yes
-configure:6271: checking udunits2.h usability
-configure:6288: cc -c   conftest.c >&5
-conftest.c:58:22: error: udunits2.h: No such file or directory
-configure:6294: $? = 1
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "ncview"
-| #define PACKAGE_TARNAME "ncview"
-| #define PACKAGE_VERSION "2.0.0"
-| #define PACKAGE_STRING "ncview 2.0.0"
-| #define PACKAGE_BUGREPORT "dpierce at ucsd.edu"
-| #define HAVE_NETCDF 1
-| #define HAVE_NETCDF4 1
-| #define STDC_HEADERS 1
-| #define PACKAGE "ncview"
-| #define VERSION "2.0.0"
-| #define HAVE_LIBXT 1
-| #define HAVE_LIBXAW 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_LIBX11 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include <udunits2.h>
-configure:6308: result: no
-configure:6312: checking udunits2.h presence
-configure:6327: cc -E  conftest.c
-conftest.c:25:22: error: udunits2.h: No such file or directory
-configure:6333: $? = 1
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "ncview"
-| #define PACKAGE_TARNAME "ncview"
-| #define PACKAGE_VERSION "2.0.0"
-| #define PACKAGE_STRING "ncview 2.0.0"
-| #define PACKAGE_BUGREPORT "dpierce at ucsd.edu"
-| #define HAVE_NETCDF 1
-| #define HAVE_NETCDF4 1
-| #define STDC_HEADERS 1
-| #define PACKAGE "ncview"
-| #define VERSION "2.0.0"
-| #define HAVE_LIBXT 1
-| #define HAVE_LIBXAW 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_LIBX11 1
-| /* end confdefs.h.  */
-| #include <udunits2.h>
-configure:6347: result: no
-configure:6380: checking for udunits2.h
-configure:6387: result: no
-configure:6408: checking /usr/local/include/udunits2.h usability
-configure:6425: cc -c   conftest.c >&5
-conftest.c:58:41: error: /usr/local/include/udunits2.h: No such file or directory
-configure:6431: $? = 1
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "ncview"
-| #define PACKAGE_TARNAME "ncview"
-| #define PACKAGE_VERSION "2.0.0"
-| #define PACKAGE_STRING "ncview 2.0.0"
-| #define PACKAGE_BUGREPORT "dpierce at ucsd.edu"
-| #define HAVE_NETCDF 1
-| #define HAVE_NETCDF4 1
-| #define STDC_HEADERS 1
-| #define PACKAGE "ncview"
-| #define VERSION "2.0.0"
-| #define HAVE_LIBXT 1
-| #define HAVE_LIBXAW 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_LIBX11 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include </usr/local/include/udunits2.h>
-configure:6445: result: no
-configure:6449: checking /usr/local/include/udunits2.h presence
-configure:6464: cc -E  conftest.c
-conftest.c:25:41: error: /usr/local/include/udunits2.h: No such file or directory
-configure:6470: $? = 1
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "ncview"
-| #define PACKAGE_TARNAME "ncview"
-| #define PACKAGE_VERSION "2.0.0"
-| #define PACKAGE_STRING "ncview 2.0.0"
-| #define PACKAGE_BUGREPORT "dpierce at ucsd.edu"
-| #define HAVE_NETCDF 1
-| #define HAVE_NETCDF4 1
-| #define STDC_HEADERS 1
-| #define PACKAGE "ncview"
-| #define VERSION "2.0.0"
-| #define HAVE_LIBXT 1
-| #define HAVE_LIBXAW 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_LIBX11 1
-| /* end confdefs.h.  */
-| #include </usr/local/include/udunits2.h>
-configure:6484: result: no
-configure:6517: checking for /usr/local/include/udunits2.h
-configure:6524: result: no
-configure:6545: checking /usr/include/udunits2.h usability
-configure:6562: cc -c   conftest.c >&5
-conftest.c:58:35: error: /usr/include/udunits2.h: No such file or directory
-configure:6568: $? = 1
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "ncview"
-| #define PACKAGE_TARNAME "ncview"
-| #define PACKAGE_VERSION "2.0.0"
-| #define PACKAGE_STRING "ncview 2.0.0"
-| #define PACKAGE_BUGREPORT "dpierce at ucsd.edu"
-| #define HAVE_NETCDF 1
-| #define HAVE_NETCDF4 1
-| #define STDC_HEADERS 1
-| #define PACKAGE "ncview"
-| #define VERSION "2.0.0"
-| #define HAVE_LIBXT 1
-| #define HAVE_LIBXAW 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_LIBX11 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include </usr/include/udunits2.h>
-configure:6582: result: no
-configure:6586: checking /usr/include/udunits2.h presence
-configure:6601: cc -E  conftest.c
-conftest.c:25:35: error: /usr/include/udunits2.h: No such file or directory
-configure:6607: $? = 1
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "ncview"
-| #define PACKAGE_TARNAME "ncview"
-| #define PACKAGE_VERSION "2.0.0"
-| #define PACKAGE_STRING "ncview 2.0.0"
-| #define PACKAGE_BUGREPORT "dpierce at ucsd.edu"
-| #define HAVE_NETCDF 1
-| #define HAVE_NETCDF4 1
-| #define STDC_HEADERS 1
-| #define PACKAGE "ncview"
-| #define VERSION "2.0.0"
-| #define HAVE_LIBXT 1
-| #define HAVE_LIBXAW 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_LIBX11 1
-| /* end confdefs.h.  */
-| #include </usr/include/udunits2.h>
-configure:6621: result: no
-configure:6654: checking for /usr/include/udunits2.h
-configure:6661: result: no
-configure:6684: checking /home/pierce/include/udunits2.h usability
-configure:6701: cc -c   conftest.c >&5
-configure:6707: $? = 0
-configure:6721: result: yes
-configure:6725: checking /home/pierce/include/udunits2.h presence
-configure:6740: cc -E  conftest.c
-configure:6746: $? = 0
-configure:6760: result: yes
-configure:6793: checking for /home/pierce/include/udunits2.h
-configure:6801: result: yes
-configure:6991: checking for ut_read_xml in -ludunits2
-configure:7026: cc -o conftest    conftest.c -ludunits2   >&5
-/usr/bin/ld: cannot find -ludunits2
-collect2: ld returned 1 exit status
-configure:7032: $? = 1
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "ncview"
-| #define PACKAGE_TARNAME "ncview"
-| #define PACKAGE_VERSION "2.0.0"
-| #define PACKAGE_STRING "ncview 2.0.0"
-| #define PACKAGE_BUGREPORT "dpierce at ucsd.edu"
-| #define HAVE_NETCDF 1
-| #define HAVE_NETCDF4 1
-| #define STDC_HEADERS 1
-| #define PACKAGE "ncview"
-| #define VERSION "2.0.0"
-| #define HAVE_LIBXT 1
-| #define HAVE_LIBXAW 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_LIBX11 1
-| /* end confdefs.h.  */
-| 
-| /* Override any GCC internal prototype to avoid an error.
-|    Use char because int might match the return type of a GCC
-|    builtin and then its argument prototype would still apply.  */
-| #ifdef __cplusplus
-| extern "C"
-| #endif
-| char ut_read_xml ();
-| int
-| main ()
-| {
-| return ut_read_xml ();
-|   ;
-|   return 0;
-| }
-configure:7050: result: no
-configure:7059: checking for /usr/local/lib/libudunits2.a
-configure:7075: result: no
-configure:7084: checking for /usr/lib/libudunits2.a
-configure:7100: result: no
-configure:7109: checking for /lib/libudunits2.a
-configure:7125: result: no
-configure:7134: checking for /home/pierce/lib/libudunits2.a
-configure:7150: result: yes
-configure:7199: checking for expat library (required by udunits2)
-configure:7201: result: 
-configure:7204: checking for XML_GetBase in -lexpat
-configure:7239: cc -o conftest    conftest.c -lexpat  -L/home/pierce/lib -ludunits2 >&5
-configure:7245: $? = 0
-configure:7263: result: yes
-configure:7495: checking /usr/local/include/ppm.h usability
-configure:7512: cc -c   conftest.c >&5
-conftest.c:60:36: error: /usr/local/include/ppm.h: No such file or directory
-configure:7518: $? = 1
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "ncview"
-| #define PACKAGE_TARNAME "ncview"
-| #define PACKAGE_VERSION "2.0.0"
-| #define PACKAGE_STRING "ncview 2.0.0"
-| #define PACKAGE_BUGREPORT "dpierce at ucsd.edu"
-| #define HAVE_NETCDF 1
-| #define HAVE_NETCDF4 1
-| #define STDC_HEADERS 1
-| #define PACKAGE "ncview"
-| #define VERSION "2.0.0"
-| #define HAVE_LIBXT 1
-| #define HAVE_LIBXAW 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_LIBX11 1
-| #define HAVE_UDUNITS2 1
-| #define HAVE_LIBEXPAT 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include </usr/local/include/ppm.h>
-configure:7532: result: no
-configure:7536: checking /usr/local/include/ppm.h presence
-configure:7551: cc -E  conftest.c
-conftest.c:27:36: error: /usr/local/include/ppm.h: No such file or directory
-configure:7557: $? = 1
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "ncview"
-| #define PACKAGE_TARNAME "ncview"
-| #define PACKAGE_VERSION "2.0.0"
-| #define PACKAGE_STRING "ncview 2.0.0"
-| #define PACKAGE_BUGREPORT "dpierce at ucsd.edu"
-| #define HAVE_NETCDF 1
-| #define HAVE_NETCDF4 1
-| #define STDC_HEADERS 1
-| #define PACKAGE "ncview"
-| #define VERSION "2.0.0"
-| #define HAVE_LIBXT 1
-| #define HAVE_LIBXAW 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_LIBX11 1
-| #define HAVE_UDUNITS2 1
-| #define HAVE_LIBEXPAT 1
-| /* end confdefs.h.  */
-| #include </usr/local/include/ppm.h>
-configure:7571: result: no
-configure:7604: checking for /usr/local/include/ppm.h
-configure:7611: result: no
-configure:7632: checking /usr/include/ppm.h usability
-configure:7649: cc -c   conftest.c >&5
-conftest.c:60:30: error: /usr/include/ppm.h: No such file or directory
-configure:7655: $? = 1
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "ncview"
-| #define PACKAGE_TARNAME "ncview"
-| #define PACKAGE_VERSION "2.0.0"
-| #define PACKAGE_STRING "ncview 2.0.0"
-| #define PACKAGE_BUGREPORT "dpierce at ucsd.edu"
-| #define HAVE_NETCDF 1
-| #define HAVE_NETCDF4 1
-| #define STDC_HEADERS 1
-| #define PACKAGE "ncview"
-| #define VERSION "2.0.0"
-| #define HAVE_LIBXT 1
-| #define HAVE_LIBXAW 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_LIBX11 1
-| #define HAVE_UDUNITS2 1
-| #define HAVE_LIBEXPAT 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include </usr/include/ppm.h>
-configure:7669: result: no
-configure:7673: checking /usr/include/ppm.h presence
-configure:7688: cc -E  conftest.c
-conftest.c:27:30: error: /usr/include/ppm.h: No such file or directory
-configure:7694: $? = 1
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "ncview"
-| #define PACKAGE_TARNAME "ncview"
-| #define PACKAGE_VERSION "2.0.0"
-| #define PACKAGE_STRING "ncview 2.0.0"
-| #define PACKAGE_BUGREPORT "dpierce at ucsd.edu"
-| #define HAVE_NETCDF 1
-| #define HAVE_NETCDF4 1
-| #define STDC_HEADERS 1
-| #define PACKAGE "ncview"
-| #define VERSION "2.0.0"
-| #define HAVE_LIBXT 1
-| #define HAVE_LIBXAW 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_LIBX11 1
-| #define HAVE_UDUNITS2 1
-| #define HAVE_LIBEXPAT 1
-| /* end confdefs.h.  */
-| #include </usr/include/ppm.h>
-configure:7708: result: no
-configure:7741: checking for /usr/include/ppm.h
-configure:7748: result: no
-configure:7771: checking /home/pierce/include/ppm.h usability
-configure:7788: cc -c   conftest.c >&5
-conftest.c:60:38: error: /home/pierce/include/ppm.h: No such file or directory
-configure:7794: $? = 1
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "ncview"
-| #define PACKAGE_TARNAME "ncview"
-| #define PACKAGE_VERSION "2.0.0"
-| #define PACKAGE_STRING "ncview 2.0.0"
-| #define PACKAGE_BUGREPORT "dpierce at ucsd.edu"
-| #define HAVE_NETCDF 1
-| #define HAVE_NETCDF4 1
-| #define STDC_HEADERS 1
-| #define PACKAGE "ncview"
-| #define VERSION "2.0.0"
-| #define HAVE_LIBXT 1
-| #define HAVE_LIBXAW 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_LIBX11 1
-| #define HAVE_UDUNITS2 1
-| #define HAVE_LIBEXPAT 1
-| /* end confdefs.h.  */
-| #include <stdio.h>
-| #ifdef HAVE_SYS_TYPES_H
-| # include <sys/types.h>
-| #endif
-| #ifdef HAVE_SYS_STAT_H
-| # include <sys/stat.h>
-| #endif
-| #ifdef STDC_HEADERS
-| # include <stdlib.h>
-| # include <stddef.h>
-| #else
-| # ifdef HAVE_STDLIB_H
-| #  include <stdlib.h>
-| # endif
-| #endif
-| #ifdef HAVE_STRING_H
-| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-| #  include <memory.h>
-| # endif
-| # include <string.h>
-| #endif
-| #ifdef HAVE_STRINGS_H
-| # include <strings.h>
-| #endif
-| #ifdef HAVE_INTTYPES_H
-| # include <inttypes.h>
-| #endif
-| #ifdef HAVE_STDINT_H
-| # include <stdint.h>
-| #endif
-| #ifdef HAVE_UNISTD_H
-| # include <unistd.h>
-| #endif
-| #include </home/pierce/include/ppm.h>
-configure:7808: result: no
-configure:7812: checking /home/pierce/include/ppm.h presence
-configure:7827: cc -E  conftest.c
-conftest.c:27:38: error: /home/pierce/include/ppm.h: No such file or directory
-configure:7833: $? = 1
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "ncview"
-| #define PACKAGE_TARNAME "ncview"
-| #define PACKAGE_VERSION "2.0.0"
-| #define PACKAGE_STRING "ncview 2.0.0"
-| #define PACKAGE_BUGREPORT "dpierce at ucsd.edu"
-| #define HAVE_NETCDF 1
-| #define HAVE_NETCDF4 1
-| #define STDC_HEADERS 1
-| #define PACKAGE "ncview"
-| #define VERSION "2.0.0"
-| #define HAVE_LIBXT 1
-| #define HAVE_LIBXAW 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_LIBX11 1
-| #define HAVE_UDUNITS2 1
-| #define HAVE_LIBEXPAT 1
-| /* end confdefs.h.  */
-| #include </home/pierce/include/ppm.h>
-configure:7847: result: no
-configure:7880: checking for /home/pierce/include/ppm.h
-configure:7888: result: no
-configure:7938: checking for ppm_writeppm in -lppm
-configure:7973: cc -o conftest    conftest.c -lppm   >&5
-/usr/bin/ld: cannot find -lppm
-collect2: ld returned 1 exit status
-configure:7979: $? = 1
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "ncview"
-| #define PACKAGE_TARNAME "ncview"
-| #define PACKAGE_VERSION "2.0.0"
-| #define PACKAGE_STRING "ncview 2.0.0"
-| #define PACKAGE_BUGREPORT "dpierce at ucsd.edu"
-| #define HAVE_NETCDF 1
-| #define HAVE_NETCDF4 1
-| #define STDC_HEADERS 1
-| #define PACKAGE "ncview"
-| #define VERSION "2.0.0"
-| #define HAVE_LIBXT 1
-| #define HAVE_LIBXAW 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_LIBX11 1
-| #define HAVE_UDUNITS2 1
-| #define HAVE_LIBEXPAT 1
-| /* end confdefs.h.  */
-| 
-| /* Override any GCC internal prototype to avoid an error.
-|    Use char because int might match the return type of a GCC
-|    builtin and then its argument prototype would still apply.  */
-| #ifdef __cplusplus
-| extern "C"
-| #endif
-| char ppm_writeppm ();
-| int
-| main ()
-| {
-| return ppm_writeppm ();
-|   ;
-|   return 0;
-| }
-configure:7997: result: no
-configure:8006: checking for /usr/local/lib/libppm.so
-configure:8022: result: no
-configure:8031: checking for /usr/lib/libppm.so
-configure:8047: result: no
-configure:8056: checking for /lib/libppm.so
-configure:8072: result: no
-configure:8081: checking for /home/pierce/lib/libppm.so
-configure:8097: result: no
-configure:8107: checking for ppm_writeppm in -lnetpbm
-configure:8142: cc -o conftest    conftest.c -lnetpbm   >&5
-/usr/bin/ld: cannot find -lnetpbm
-collect2: ld returned 1 exit status
-configure:8148: $? = 1
-configure: failed program was:
-| /* confdefs.h.  */
-| #define PACKAGE_NAME "ncview"
-| #define PACKAGE_TARNAME "ncview"
-| #define PACKAGE_VERSION "2.0.0"
-| #define PACKAGE_STRING "ncview 2.0.0"
-| #define PACKAGE_BUGREPORT "dpierce at ucsd.edu"
-| #define HAVE_NETCDF 1
-| #define HAVE_NETCDF4 1
-| #define STDC_HEADERS 1
-| #define PACKAGE "ncview"
-| #define VERSION "2.0.0"
-| #define HAVE_LIBXT 1
-| #define HAVE_LIBXAW 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define HAVE_LIBX11 1
-| #define HAVE_UDUNITS2 1
-| #define HAVE_LIBEXPAT 1
-| /* end confdefs.h.  */
-| 
-| /* Override any GCC internal prototype to avoid an error.
-|    Use char because int might match the return type of a GCC
-|    builtin and then its argument prototype would still apply.  */
-| #ifdef __cplusplus
-| extern "C"
-| #endif
-| char ppm_writeppm ();
-| int
-| main ()
-| {
-| return ppm_writeppm ();
-|   ;
-|   return 0;
-| }
-configure:8166: result: no
-configure:8175: checking for /usr/local/lib/libnetpbm.so
-configure:8191: result: no
-configure:8200: checking for /usr/lib/libnetpbm.so
-configure:8216: result: no
-configure:8225: checking for /lib/libnetpbm.so
-configure:8241: result: no
-configure:8250: checking for /home/pierce/lib/libnetpbm.so
-configure:8266: result: no
-configure:8325: checking for a BSD-compatible install
-configure:8381: result: /usr/bin/install -c
-configure:8582: creating ./config.status
-
-## ---------------------- ##
-## Running config.status. ##
-## ---------------------- ##
-
-This file was extended by ncview config.status 2.0.0, which was
-generated by GNU Autoconf 2.61.  Invocation command line was
-
-  CONFIG_FILES    = 
-  CONFIG_HEADERS  = 
-  CONFIG_LINKS    = 
-  CONFIG_COMMANDS = 
-  $ ./config.status 
-
-on cirrus
-
-config.status:669: creating Makefile
-config.status:669: creating src/Makefile
-config.status:669: creating config.h
-config.status:902: config.h is unchanged
-config.status:949: executing depfiles commands
-
-## ---------------- ##
-## Cache variables. ##
-## ---------------- ##
-
-ac_cv_c_compiler_gnu=yes
-ac_cv_env_CC_set=
-ac_cv_env_CC_value=
-ac_cv_env_CFLAGS_set=
-ac_cv_env_CFLAGS_value=
-ac_cv_env_CPPFLAGS_set=
-ac_cv_env_CPPFLAGS_value=
-ac_cv_env_CPP_set=
-ac_cv_env_CPP_value=
-ac_cv_env_LDFLAGS_set=
-ac_cv_env_LDFLAGS_value=
-ac_cv_env_LIBS_set=
-ac_cv_env_LIBS_value=
-ac_cv_env_XMKMF_set=
-ac_cv_env_XMKMF_value=
-ac_cv_env_build_alias_set=
-ac_cv_env_build_alias_value=
-ac_cv_env_host_alias_set=
-ac_cv_env_host_alias_value=
-ac_cv_env_target_alias_set=
-ac_cv_env_target_alias_value=
-ac_cv_file__home_pierce_lib_libnetpbm_so=no
-ac_cv_file__home_pierce_lib_libppm_so=no
-ac_cv_file__home_pierce_lib_libudunits2_a=yes
-ac_cv_file__lib_libnetpbm_so=no
-ac_cv_file__lib_libppm_so=no
-ac_cv_file__lib_libudunits2_a=no
-ac_cv_file__usr_lib_libnetpbm_so=no
-ac_cv_file__usr_lib_libppm_so=no
-ac_cv_file__usr_lib_libudunits2_a=no
-ac_cv_file__usr_local_lib_libnetpbm_so=no
-ac_cv_file__usr_local_lib_libppm_so=no
-ac_cv_file__usr_local_lib_libudunits2_a=no
-ac_cv_func_connect=yes
-ac_cv_func_gethostbyname=yes
-ac_cv_func_remove=yes
-ac_cv_func_shmat=yes
-ac_cv_have_x='have_x=yes	ac_x_includes='\'''\''	ac_x_libraries='\'''\'''
-ac_cv_header_X11_Intrinsic_h=yes
-ac_cv_header_X11_Xaw_Simple_h=yes
-ac_cv_header__home_pierce_include_ppm_h=no
-ac_cv_header__home_pierce_include_udunits2_h=yes
-ac_cv_header__usr_include_ppm_h=no
-ac_cv_header__usr_include_udunits2_h=no
-ac_cv_header__usr_local_include_ppm_h=no
-ac_cv_header__usr_local_include_udunits2_h=no
-ac_cv_header_inttypes_h=yes
-ac_cv_header_memory_h=yes
-ac_cv_header_stdc=yes
-ac_cv_header_stdint_h=yes
-ac_cv_header_stdlib_h=yes
-ac_cv_header_string_h=yes
-ac_cv_header_strings_h=yes
-ac_cv_header_sys_stat_h=yes
-ac_cv_header_sys_types_h=yes
-ac_cv_header_udunits2_h=no
-ac_cv_header_unistd_h=yes
-ac_cv_lib_ICE_IceConnectionNumber=yes
-ac_cv_lib_X11_XPutImage=yes
-ac_cv_lib_Xaw_XawScrollbarSetThumb=yes
-ac_cv_lib_Xt_XtWindow=yes
-ac_cv_lib_expat_XML_GetBase=yes
-ac_cv_lib_netpbm_ppm_writeppm=no
-ac_cv_lib_ppm_ppm_writeppm=no
-ac_cv_lib_udunits2_ut_read_xml=no
-ac_cv_objext=o
-ac_cv_path_EGREP='/bin/grep -E'
-ac_cv_path_GREP=/bin/grep
-ac_cv_path_install='/usr/bin/install -c'
-ac_cv_path_mkdir=/bin/mkdir
-ac_cv_prog_AWK=mawk
-ac_cv_prog_CPP='cc -E'
-ac_cv_prog_HAS_NC_CONFIG=yes
-ac_cv_prog_ac_ct_CC=cc
-ac_cv_prog_cc_c89=
-ac_cv_prog_cc_g=yes
-ac_cv_prog_make_make_set=yes
-ac_cv_search_strerror='none required'
-am_cv_CC_dependencies_compiler_type=gcc3
-
-## ----------------- ##
-## Output variables. ##
-## ----------------- ##
-
-ACLOCAL='${SHELL} /home/pierce/src/mine/ncview/ncview-2.0beta3/missing --run aclocal-1.10'
-AMDEPBACKSLASH='\'
-AMDEP_FALSE='#'
-AMDEP_TRUE=''
-AMTAR='${SHELL} /home/pierce/src/mine/ncview/ncview-2.0beta3/missing --run tar'
-AUTOCONF='${SHELL} /home/pierce/src/mine/ncview/ncview-2.0beta3/missing --run autoconf'
-AUTOHEADER='${SHELL} /home/pierce/src/mine/ncview/ncview-2.0beta3/missing --run autoheader'
-AUTOMAKE='${SHELL} /home/pierce/src/mine/ncview/ncview-2.0beta3/missing --run automake-1.10'
-AWK='mawk'
-CC='cc'
-CCDEPMODE='depmode=gcc3'
-CFLAGS=''
-CPP='cc -E'
-CPPFLAGS=''
-CYGPATH_W='echo'
-DEFS='-DHAVE_CONFIG_H'
-DEPDIR='.deps'
-DO_PPM_INCDIR='#PPMINCDIR = -I'
-DO_PPM_LIBDIR='#PPMLIBDIR = -I'
-DO_PPM_LIBNAME='#PPMLIB = -lnetpbm'
-DO_PPM_LINE='#INC_PPM   = -DINC_PPM'
-DO_UDUNITS2_INCDIR='UDUNITS2INCDIR = -I/home/pierce/include'
-DO_UDUNITS2_LIBDIR='UDUNITS2LIBDIR = -L/home/pierce/lib'
-DO_UDUNITS2_LIBNAME='UDUNITS2LIB = -ludunits2'
-DO_UDUNITS2_LINE='INC_UDUNITS2   = -DINC_UDUNITS2'
-ECHO_C=''
-ECHO_N='-n'
-ECHO_T=''
-EGREP='/bin/grep -E'
-EXEEXT=''
-GREP='/bin/grep'
-HAS_NC_CONFIG='yes'
-INSTALL_DATA='${INSTALL} -m 644'
-INSTALL_PROGRAM='${INSTALL}'
-INSTALL_SCRIPT='${INSTALL}'
-INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
-LDFLAGS=''
-LIBOBJS=''
-LIBS=''
-LTLIBOBJS=''
-MAKEINFO='${SHELL} /home/pierce/src/mine/ncview/ncview-2.0beta3/missing --run makeinfo'
-NETCDF_CC='cc'
-NETCDF_CPPFLAGS='-I/home/pierce/include'
-NETCDF_LDFLAGS='-L/home/pierce/lib -lnetcdf -L/home/pierce/lib -lhdf5_hl -lhdf5 -lz -lm'
-NETCDF_LIBS=''
-NETCDF_VERSION='netCDF 4.1-beta2'
-OBJEXT='o'
-PACKAGE='ncview'
-PACKAGE_BUGREPORT='dpierce at ucsd.edu'
-PACKAGE_NAME='ncview'
-PACKAGE_STRING='ncview 2.0.0'
-PACKAGE_TARNAME='ncview'
-PACKAGE_VERSION='2.0.0'
-PATH_SEPARATOR=':'
-PPM_INCDIR=''
-PPM_LIBDIR=''
-PPM_LIBNAME='netpbm'
-PREFIX='/home/pierce'
-RPATH_FLAGS=' -Wl,-R,/home/pierce/lib -Wl,-R,/home/pierce/lib -Wl,-R,/home/pierce/lib -Wl,-R,/home/pierce/lib'
-SET_MAKE=''
-SHELL='/bin/bash'
-STRIP=''
-UDUNITS2_CPPFLAGS='-I/home/pierce/include'
-UDUNITS2_LDFLAGS='-L/home/pierce/lib -ludunits2 -lexpat -L/home/pierce/lib -ludunits2'
-UDUNITS2_LIBS='-ludunits2'
-VERSION='2.0.0'
-X11_LIBS='-lX11 '
-XAW_LIBS='-lXaw -lXt '
-XMKMF=''
-X_CFLAGS=''
-X_EXTRA_LIBS=''
-X_INCLUDES=''
-X_LIBS=''
-X_PRE_LIBS=' -lSM -lICE'
-ac_ct_CC='cc'
-am__fastdepCC_FALSE='#'
-am__fastdepCC_TRUE=''
-am__include='include'
-am__isrc=''
-am__leading_dot='.'
-am__quote=''
-am__tar='${AMTAR} chof - "$$tardir"'
-am__untar='${AMTAR} xf -'
-bindir='${exec_prefix}/bin'
-build_alias=''
-datadir='${datarootdir}'
-datarootdir='${prefix}/share'
-docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
-dvidir='${docdir}'
-exec_prefix='${prefix}'
-host_alias=''
-htmldir='${docdir}'
-includedir='${prefix}/include'
-infodir='${datarootdir}/info'
-install_sh='$(SHELL) /home/pierce/src/mine/ncview/ncview-2.0beta3/install-sh'
-libdir='${exec_prefix}/lib'
-libexecdir='${exec_prefix}/libexec'
-localedir='${datarootdir}/locale'
-localstatedir='${prefix}/var'
-mandir='${datarootdir}/man'
-mkdir_p='/bin/mkdir -p'
-oldincludedir='/usr/include'
-pdfdir='${docdir}'
-prefix='/home/pierce'
-program_transform_name='s,x,x,'
-psdir='${docdir}'
-sbindir='${exec_prefix}/sbin'
-sharedstatedir='${prefix}/com'
-sysconfdir='${prefix}/etc'
-target_alias=''
-
-## ----------- ##
-## confdefs.h. ##
-## ----------- ##
-
-#define PACKAGE_NAME "ncview"
-#define PACKAGE_TARNAME "ncview"
-#define PACKAGE_VERSION "2.0.0"
-#define PACKAGE_STRING "ncview 2.0.0"
-#define PACKAGE_BUGREPORT "dpierce at ucsd.edu"
-#define HAVE_NETCDF 1
-#define HAVE_NETCDF4 1
-#define STDC_HEADERS 1
-#define PACKAGE "ncview"
-#define VERSION "2.0.0"
-#define HAVE_LIBXT 1
-#define HAVE_LIBXAW 1
-#define HAVE_SYS_TYPES_H 1
-#define HAVE_SYS_STAT_H 1
-#define HAVE_STDLIB_H 1
-#define HAVE_STRING_H 1
-#define HAVE_MEMORY_H 1
-#define HAVE_STRINGS_H 1
-#define HAVE_INTTYPES_H 1
-#define HAVE_STDINT_H 1
-#define HAVE_UNISTD_H 1
-#define HAVE_LIBX11 1
-#define HAVE_UDUNITS2 1
-#define HAVE_LIBEXPAT 1
-
-configure: exit 0
diff --git a/config.status b/config.status
deleted file mode 100755
index 27860d1..0000000
--- a/config.status
+++ /dev/null
@@ -1,1085 +0,0 @@
-#! /bin/bash
-# Generated by configure.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
-
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-SHELL=${CONFIG_SHELL-/bin/bash}
-## --------------------- ##
-## M4sh Initialization.  ##
-## --------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
-esac
-
-fi
-
-
-
-
-# PATH needs CR
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conf$$.sh
-  echo  "exit 0"   >>conf$$.sh
-  chmod +x conf$$.sh
-  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-    PATH_SEPARATOR=';'
-  else
-    PATH_SEPARATOR=:
-  fi
-  rm -f conf$$.sh
-fi
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-  as_unset=unset
-else
-  as_unset=false
-fi
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.  Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-as_nl='
-'
-IFS=" ""	$as_nl"
-
-# Find who we are.  Look in the path if we contain no directory separator.
-case $0 in
-  *[\\/]* ) as_myself=$0 ;;
-  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-IFS=$as_save_IFS
-
-     ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
-  as_myself=$0
-fi
-if test ! -f "$as_myself"; then
-  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
-  { (exit 1); exit 1; }
-fi
-
-# Work around bugs in pre-3.0 UWIN ksh.
-for as_var in ENV MAIL MAILPATH
-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-for as_var in \
-  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
-  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
-  LC_TELEPHONE LC_TIME
-do
-  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
-    eval $as_var=C; export $as_var
-  else
-    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-  fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
-  as_basename=basename
-else
-  as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
-	 X"$0" : 'X\(//\)$' \| \
-	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-echo X/"$0" |
-    sed '/^.*\/\([^/][^/]*\)\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\/\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\/\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-
-# CDPATH.
-$as_unset CDPATH
-
-
-
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
-
-  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
-  # uniformly replaced by the line number.  The first 'sed' inserts a
-  # line-number line after each line using $LINENO; the second 'sed'
-  # does the real work.  The second script uses 'N' to pair each
-  # line-number line with the line containing $LINENO, and appends
-  # trailing '-' during substitution so that $LINENO is not a special
-  # case at line end.
-  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
-  # scripts with optimization help from Paolo Bonzini.  Blame Lee
-  # E. McMahon (1931-1989) for sed's syntax.  :-)
-  sed -n '
-    p
-    /[$]LINENO/=
-  ' <$as_myself |
-    sed '
-      s/[$]LINENO.*/&-/
-      t lineno
-      b
-      :lineno
-      N
-      :loop
-      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
-      t loop
-      s/-\n.*//
-    ' >$as_me.lineno &&
-  chmod +x "$as_me.lineno" ||
-    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
-   { (exit 1); exit 1; }; }
-
-  # Don't try to exec as it changes $[0], causing all sort of problems
-  # (the dirname of $[0] is not the place where we might find the
-  # original and so on.  Autoconf is especially sensitive to this).
-  . "./$as_me.lineno"
-  # Exit status is that of the last command.
-  exit
-}
-
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
-  as_dirname=dirname
-else
-  as_dirname=false
-fi
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
--n*)
-  case `echo 'x\c'` in
-  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
-  *)   ECHO_C='\c';;
-  esac;;
-*)
-  ECHO_N='-n';;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
-  rm -f conf$$.dir/conf$$.file
-else
-  rm -f conf$$.dir
-  mkdir conf$$.dir
-fi
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s='ln -s'
-  # ... but there are two gotchas:
-  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
-  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-  # In both cases, we have to default to `cp -p'.
-  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-    as_ln_s='cp -p'
-elif ln conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s=ln
-else
-  as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-if mkdir -p . 2>/dev/null; then
-  as_mkdir_p=:
-else
-  test -d ./-p && rmdir ./-p
-  as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-        test -d "$1/.";
-      else
-	case $1 in
-        -*)set "./$1";;
-	esac;
-	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
-	???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-exec 6>&1
-
-# Save the log message, to keep $[0] and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling.
-ac_log="
-This file was extended by ncview $as_me 2.0.0, which was
-generated by GNU Autoconf 2.61.  Invocation command line was
-
-  CONFIG_FILES    = $CONFIG_FILES
-  CONFIG_HEADERS  = $CONFIG_HEADERS
-  CONFIG_LINKS    = $CONFIG_LINKS
-  CONFIG_COMMANDS = $CONFIG_COMMANDS
-  $ $0 $@
-
-on `(hostname || uname -n) 2>/dev/null | sed 1q`
-"
-
-# Files that config.status was made for.
-config_files=" Makefile src/Makefile"
-config_headers=" config.h"
-config_commands=" depfiles"
-
-ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
-
-Usage: $0 [OPTIONS] [FILE]...
-
-  -h, --help       print this help, then exit
-  -V, --version    print version number and configuration settings, then exit
-  -q, --quiet      do not print progress messages
-  -d, --debug      don't remove temporary files
-      --recheck    update $as_me by reconfiguring in the same conditions
-  --file=FILE[:TEMPLATE]
-		   instantiate the configuration file FILE
-  --header=FILE[:TEMPLATE]
-		   instantiate the configuration header FILE
-
-Configuration files:
-$config_files
-
-Configuration headers:
-$config_headers
-
-Configuration commands:
-$config_commands
-
-Report bugs to <bug-autoconf at gnu.org>."
-
-ac_cs_version="\
-ncview config.status 2.0.0
-configured by ./configure, generated by GNU Autoconf 2.61,
-  with options \"'--prefix=/home/pierce'\"
-
-Copyright (C) 2006 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
-
-ac_pwd='/home/pierce/src/mine/ncview/ncview-2.0beta3'
-srcdir='.'
-INSTALL='/usr/bin/install -c'
-MKDIR_P='/bin/mkdir -p'
-# If no file are specified by the user, then we need to provide default
-# value.  By we need to know if files were specified by the user.
-ac_need_defaults=:
-while test $# != 0
-do
-  case $1 in
-  --*=*)
-    ac_option=`expr "X$1" : 'X\([^=]*\)='`
-    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
-    ac_shift=:
-    ;;
-  *)
-    ac_option=$1
-    ac_optarg=$2
-    ac_shift=shift
-    ;;
-  esac
-
-  case $ac_option in
-  # Handling of the options.
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    ac_cs_recheck=: ;;
-  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
-    echo "$ac_cs_version"; exit ;;
-  --debug | --debu | --deb | --de | --d | -d )
-    debug=: ;;
-  --file | --fil | --fi | --f )
-    $ac_shift
-    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
-    ac_need_defaults=false;;
-  --header | --heade | --head | --hea )
-    $ac_shift
-    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
-    ac_need_defaults=false;;
-  --he | --h)
-    # Conflict between --help and --header
-    { echo "$as_me: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&2
-   { (exit 1); exit 1; }; };;
-  --help | --hel | -h )
-    echo "$ac_cs_usage"; exit ;;
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil | --si | --s)
-    ac_cs_silent=: ;;
-
-  # This is an error.
-  -*) { echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2
-   { (exit 1); exit 1; }; } ;;
-
-  *) ac_config_targets="$ac_config_targets $1"
-     ac_need_defaults=false ;;
-
-  esac
-  shift
-done
-
-ac_configure_extra_args=
-
-if $ac_cs_silent; then
-  exec 6>/dev/null
-  ac_configure_extra_args="$ac_configure_extra_args --silent"
-fi
-
-if $ac_cs_recheck; then
-  echo "running CONFIG_SHELL=/bin/bash /bin/bash ./configure " '--prefix=/home/pierce' $ac_configure_extra_args " --no-create --no-recursion" >&6
-  CONFIG_SHELL=/bin/bash
-  export CONFIG_SHELL
-  exec /bin/bash "./configure" '--prefix=/home/pierce' $ac_configure_extra_args --no-create --no-recursion
-fi
-
-exec 5>>config.log
-{
-  echo
-  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-  echo "$ac_log"
-} >&5
-
-#
-# INIT-COMMANDS
-#
-AMDEP_TRUE="" ac_aux_dir="."
-
-
-# Handling of arguments.
-for ac_config_target in $ac_config_targets
-do
-  case $ac_config_target in
-    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
-    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
-    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
-    "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
-
-  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
-   { (exit 1); exit 1; }; };;
-  esac
-done
-
-
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used.  Set only those that are not.
-# We use the long form for the default assignment because of an extremely
-# bizarre bug on SunOS 4.1.3.
-if $ac_need_defaults; then
-  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
-  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
-  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
-fi
-
-# Have a temporary directory for convenience.  Make it in the build tree
-# simply because there is no reason against having it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Hook for its removal unless debugging.
-# Note that there is a small window in which the directory will not be cleaned:
-# after its creation but before its name has been assigned to `$tmp'.
-$debug ||
-{
-  tmp=
-  trap 'exit_status=$?
-  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
-' 0
-  trap '{ (exit 1); exit 1; }' 1 2 13 15
-}
-# Create a (secure) tmp directory for tmp files.
-
-{
-  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
-  test -n "$tmp" && test -d "$tmp"
-}  ||
-{
-  tmp=./conf$$-$RANDOM
-  (umask 077 && mkdir "$tmp")
-} ||
-{
-   echo "$me: cannot create a temporary directory in ." >&2
-   { (exit 1); exit 1; }
-}
-
-#
-# Set up the sed scripts for CONFIG_FILES section.
-#
-
-# No need to generate the scripts if there are no CONFIG_FILES.
-# This happens for instance when ./config.status config.h
-if test -n "$CONFIG_FILES"; then
-
-cat >"$tmp/subs-1.sed" <<\CEOF
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s, at SHELL@,|#_!!_#|/bin/bash,g
-s, at PATH_SEPARATOR@,|#_!!_#|:,g
-s, at PACKAGE_NAME@,|#_!!_#|ncview,g
-s, at PACKAGE_TARNAME@,|#_!!_#|ncview,g
-s, at PACKAGE_VERSION@,|#_!!_#|2.0.0,g
-s, at PACKAGE_STRING@,|#_!!_#|ncview 2.0.0,g
-s, at PACKAGE_BUGREPORT@,|#_!!_#|dpierce@|#_!!_#|ucsd.edu,g
-s, at exec_prefix@,|#_!!_#|${prefix},g
-s, at prefix@,|#_!!_#|/home/pierce,g
-s, at program_transform_name@,|#_!!_#|s\,x\,x\,,g
-s, at bindir@,|#_!!_#|${exec_prefix}/bin,g
-s, at sbindir@,|#_!!_#|${exec_prefix}/sbin,g
-s, at libexecdir@,|#_!!_#|${exec_prefix}/libexec,g
-s, at datarootdir@,|#_!!_#|${prefix}/share,g
-s, at datadir@,|#_!!_#|${datarootdir},g
-s, at sysconfdir@,|#_!!_#|${prefix}/etc,g
-s, at sharedstatedir@,|#_!!_#|${prefix}/com,g
-s, at localstatedir@,|#_!!_#|${prefix}/var,g
-s, at includedir@,|#_!!_#|${prefix}/include,g
-s, at oldincludedir@,|#_!!_#|/usr/include,g
-s, at docdir@,|#_!!_#|${datarootdir}/doc/${PACKAGE_TARNAME},g
-s, at infodir@,|#_!!_#|${datarootdir}/info,g
-s, at htmldir@,|#_!!_#|${docdir},g
-s, at dvidir@,|#_!!_#|${docdir},g
-s, at pdfdir@,|#_!!_#|${docdir},g
-s, at psdir@,|#_!!_#|${docdir},g
-s, at libdir@,|#_!!_#|${exec_prefix}/lib,g
-s, at localedir@,|#_!!_#|${datarootdir}/locale,g
-s, at mandir@,|#_!!_#|${datarootdir}/man,g
-s, at DEFS@,|#_!!_#|-DHAVE_CONFIG_H,g
-s, at ECHO_C@,|#_!!_#|,g
-s, at ECHO_N@,|#_!!_#|-n,g
-s, at ECHO_T@,|#_!!_#|,g
-s, at LIBS@,|#_!!_#|,g
-s, at build_alias@,|#_!!_#|,g
-s, at host_alias@,|#_!!_#|,g
-s, at target_alias@,|#_!!_#|,g
-s, at HAS_NC_CONFIG@,|#_!!_#|yes,g
-s, at NETCDF_CPPFLAGS@,|#_!!_#|-I/home/pierce/include,g
-s, at NETCDF_LDFLAGS@,|#_!!_#|-L/home/pierce/lib -lnetcdf -L/home/pierce/lib -lhdf5_hl -lhdf5 -lz -lm,g
-s, at NETCDF_LIBS@,|#_!!_#|,g
-s, at NETCDF_VERSION@,|#_!!_#|netCDF 4.1-beta2,g
-s, at NETCDF_CC@,|#_!!_#|cc,g
-s, at CC@,|#_!!_#|cc,g
-s, at CFLAGS@,|#_!!_#|,g
-s, at LDFLAGS@,|#_!!_#|,g
-s, at CPPFLAGS@,|#_!!_#|,g
-s, at ac_ct_CC@,|#_!!_#|cc,g
-s, at EXEEXT@,|#_!!_#|,g
-s, at OBJEXT@,|#_!!_#|o,g
-s, at CPP@,|#_!!_#|cc -E,g
-s, at GREP@,|#_!!_#|/bin/grep,g
-s, at EGREP@,|#_!!_#|/bin/grep -E,g
-s, at INSTALL_PROGRAM@,|#_!!_#|${INSTALL},g
-s, at INSTALL_SCRIPT@,|#_!!_#|${INSTALL},g
-s, at INSTALL_DATA@,|#_!!_#|${INSTALL} -m 644,g
-s, at am__isrc@,|#_!!_#|,g
-s, at CYGPATH_W@,|#_!!_#|echo,g
-s, at PACKAGE@,|#_!!_#|ncview,g
-s, at VERSION@,|#_!!_#|2.0.0,g
-s, at ACLOCAL@,|#_!!_#|${SHELL} /home/pierce/src/mine/ncview/ncview-2.0beta3/missing --run aclocal-1.10,g
-s, at AUTOCONF@,|#_!!_#|${SHELL} /home/pierce/src/mine/ncview/ncview-2.0beta3/missing --run autoconf,g
-s, at AUTOMAKE@,|#_!!_#|${SHELL} /home/pierce/src/mine/ncview/ncview-2.0beta3/missing --run automake-1.10,g
-s, at AUTOHEADER@,|#_!!_#|${SHELL} /home/pierce/src/mine/ncview/ncview-2.0beta3/missing --run autoheader,g
-s, at MAKEINFO@,|#_!!_#|${SHELL} /home/pierce/src/mine/ncview/ncview-2.0beta3/missing --run makeinfo,g
-s, at install_sh@,|#_!!_#|$(SHELL) /home/pierce/src/mine/ncview/ncview-2.0beta3/install-sh,g
-s, at STRIP@,|#_!!_#|,g
-s, at INSTALL_STRIP_PROGRAM@,|#_!!_#|$(install_sh) -c -s,g
-s, at mkdir_p@,|#_!!_#|/bin/mkdir -p,g
-s, at AWK@,|#_!!_#|mawk,g
-s, at SET_MAKE@,|#_!!_#|,g
-s, at am__leading_dot@,|#_!!_#|.,g
-s, at AMTAR@,|#_!!_#|${SHELL} /home/pierce/src/mine/ncview/ncview-2.0beta3/missing --run tar,g
-s, at am__tar@,|#_!!_#|${AMTAR} chof - "$$tardir",g
-s, at am__untar@,|#_!!_#|${AMTAR} xf -,g
-s, at DEPDIR@,|#_!!_#|.deps,g
-s, at am__include@,|#_!!_#|include,g
-s, at am__quote@,|#_!!_#|,g
-s, at AMDEP_TRUE@,|#_!!_#|,g
-s, at AMDEP_FALSE@,|#_!!_#|#,g
-s, at AMDEPBACKSLASH@,|#_!!_#|\\,g
-s, at CCDEPMODE@,|#_!!_#|depmode=gcc3,g
-s, at am__fastdepCC_TRUE@,|#_!!_#|,g
-s, at am__fastdepCC_FALSE@,|#_!!_#|#,g
-s, at XMKMF@,|#_!!_#|,g
-s, at X_CFLAGS@,|#_!!_#|,g
-s, at X_PRE_LIBS@,|#_!!_#| -lSM -lICE,g
-s, at X_LIBS@,|#_!!_#|,g
-s, at X_EXTRA_LIBS@,|#_!!_#|,g
-s, at XAW_LIBS@,|#_!!_#|-lXaw -lXt ,g
-s, at X11_LIBS@,|#_!!_#|-lX11 ,g
-s, at UDUNITS2_CPPFLAGS@,|#_!!_#|-I/home/pierce/include,g
-s, at UDUNITS2_LDFLAGS@,|#_!!_#|-L/home/pierce/lib -ludunits2 -lexpat -L/home/pierce/lib -ludunits2,g
-s, at UDUNITS2_LIBS@,|#_!!_#|-ludunits2,g
-s, at DO_UDUNITS2_LINE@,|#_!!_#|INC_UDUNITS2   = -DINC_UDUNITS2,g
-s, at DO_UDUNITS2_INCDIR@,|#_!!_#|UDUNITS2INCDIR = -I/home/pierce/include,g
-s, at DO_UDUNITS2_LIBDIR@,|#_!!_#|UDUNITS2LIBDIR = -L/home/pierce/lib,g
-CEOF
-cat >"$tmp/subs-2.sed" <<\CEOF
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
-s, at DO_UDUNITS2_LIBNAME@,|#_!!_#|UDUNITS2LIB = -ludunits2,g
-s, at PPM_INCDIR@,|#_!!_#|,g
-s, at PPM_LIBDIR@,|#_!!_#|,g
-s, at PPM_LIBNAME@,|#_!!_#|netpbm,g
-s, at DO_PPM_LINE@,|#_!!_#|#INC_PPM   = -DINC_PPM,g
-s, at DO_PPM_INCDIR@,|#_!!_#|#PPMINCDIR = -I,g
-s, at DO_PPM_LIBDIR@,|#_!!_#|#PPMLIBDIR = -I,g
-s, at DO_PPM_LIBNAME@,|#_!!_#|#PPMLIB = -lnetpbm,g
-s, at PREFIX@,|#_!!_#|/home/pierce,g
-s, at X_INCLUDES@,|#_!!_#|,g
-s, at RPATH_FLAGS@,|#_!!_#| -Wl\,-R\,/home/pierce/lib -Wl\,-R\,/home/pierce/lib -Wl\,-R\,/home/pierce/lib -Wl\,-R\,/home/pierce/lib,g
-s, at LIBOBJS@,|#_!!_#|,g
-s, at LTLIBOBJS@,|#_!!_#|,g
-:end
-s/|#_!!_#|//g
-CEOF
-fi # test -n "$CONFIG_FILES"
-
-
-for ac_tag in  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS
-do
-  case $ac_tag in
-  :[FHLC]) ac_mode=$ac_tag; continue;;
-  esac
-  case $ac_mode$ac_tag in
-  :[FHL]*:*);;
-  :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
-echo "$as_me: error: Invalid tag $ac_tag." >&2;}
-   { (exit 1); exit 1; }; };;
-  :[FH]-) ac_tag=-:-;;
-  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
-  esac
-  ac_save_IFS=$IFS
-  IFS=:
-  set x $ac_tag
-  IFS=$ac_save_IFS
-  shift
-  ac_file=$1
-  shift
-
-  case $ac_mode in
-  :L) ac_source=$1;;
-  :[FH])
-    ac_file_inputs=
-    for ac_f
-    do
-      case $ac_f in
-      -) ac_f="$tmp/stdin";;
-      *) # Look for the file first in the build tree, then in the source tree
-	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
-	 # because $ac_f cannot contain `:'.
-	 test -f "$ac_f" ||
-	   case $ac_f in
-	   [\\/$]*) false;;
-	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
-	   esac ||
-	   { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
-echo "$as_me: error: cannot find input file: $ac_f" >&2;}
-   { (exit 1); exit 1; }; };;
-      esac
-      ac_file_inputs="$ac_file_inputs $ac_f"
-    done
-
-    # Let's still pretend it is `configure' which instantiates (i.e., don't
-    # use $as_me), people would be surprised to read:
-    #    /* config.h.  Generated by config.status.  */
-    configure_input="Generated from "`IFS=:
-	  echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
-    if test x"$ac_file" != x-; then
-      configure_input="$ac_file.  $configure_input"
-      { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
-    fi
-
-    case $ac_tag in
-    *:-:* | *:-) cat >"$tmp/stdin";;
-    esac
-    ;;
-  esac
-
-  ac_dir=`$as_dirname -- "$ac_file" ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$ac_file" : 'X\(//\)[^/]' \| \
-	 X"$ac_file" : 'X\(//\)$' \| \
-	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$ac_file" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-  { as_dir="$ac_dir"
-  case $as_dir in #(
-  -*) as_dir=./$as_dir;;
-  esac
-  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
-    as_dirs=
-    while :; do
-      case $as_dir in #(
-      *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
-      *) as_qdir=$as_dir;;
-      esac
-      as_dirs="'$as_qdir' $as_dirs"
-      as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$as_dir" : 'X\(//\)[^/]' \| \
-	 X"$as_dir" : 'X\(//\)$' \| \
-	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-      test -d "$as_dir" && break
-    done
-    test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-echo "$as_me: error: cannot create directory $as_dir" >&2;}
-   { (exit 1); exit 1; }; }; }
-  ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
-  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
-  # A ".." for each directory in $ac_dir_suffix.
-  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
-  case $ac_top_builddir_sub in
-  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
-  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
-  esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
-  .)  # We are building in place.
-    ac_srcdir=.
-    ac_top_srcdir=$ac_top_builddir_sub
-    ac_abs_top_srcdir=$ac_pwd ;;
-  [\\/]* | ?:[\\/]* )  # Absolute name.
-    ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir
-    ac_abs_top_srcdir=$srcdir ;;
-  *) # Relative name.
-    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_build_prefix$srcdir
-    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-
-  case $ac_mode in
-  :F)
-  #
-  # CONFIG_FILE
-  #
-
-  case $INSTALL in
-  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
-  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
-  esac
-  ac_MKDIR_P=$MKDIR_P
-  case $MKDIR_P in
-  [\\/$]* | ?:[\\/]* ) ;;
-  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
-  esac
-# If the template does not know about datarootdir, expand it.
-# FIXME: This hack should be removed a few years after 2.60.
-ac_datarootdir_hack=; ac_datarootdir_seen=
-
-case `sed -n '/datarootdir/ {
-  p
-  q
-}
-/@datadir@/p
-/@docdir@/p
-/@infodir@/p
-/@localedir@/p
-/@mandir@/p
-' $ac_file_inputs` in
-*datarootdir*) ac_datarootdir_seen=yes;;
-*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
-  { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
-  ac_datarootdir_hack='
-  s&@datadir@&${datarootdir}&g
-  s&@docdir@&${datarootdir}/doc/${PACKAGE_TARNAME}&g
-  s&@infodir@&${datarootdir}/info&g
-  s&@localedir@&${datarootdir}/locale&g
-  s&@mandir@&${datarootdir}/man&g
-    s&\${datarootdir}&${prefix}/share&g' ;;
-esac
-  sed "/^[	 ]*VPATH[	 ]*=/{
-s/:*\$(srcdir):*/:/
-s/:*\${srcdir}:*/:/
-s/:*@srcdir@:*/:/
-s/^\([^=]*=[	 ]*\):*/\1/
-s/:*$//
-s/^[^=]*=[	 ]*$//
-}
-
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s&@configure_input@&$configure_input&;t t
-s&@top_builddir@&$ac_top_builddir_sub&;t t
-s&@srcdir@&$ac_srcdir&;t t
-s&@abs_srcdir@&$ac_abs_srcdir&;t t
-s&@top_srcdir@&$ac_top_srcdir&;t t
-s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
-s&@builddir@&$ac_builddir&;t t
-s&@abs_builddir@&$ac_abs_builddir&;t t
-s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
-s&@INSTALL@&$ac_INSTALL&;t t
-s&@MKDIR_P@&$ac_MKDIR_P&;t t
-$ac_datarootdir_hack
-" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
-
-test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
-  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
-  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
-  { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined.  Please make sure it is defined." >&5
-echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined.  Please make sure it is defined." >&2;}
-
-  rm -f "$tmp/stdin"
-  case $ac_file in
-  -) cat "$tmp/out"; rm -f "$tmp/out";;
-  *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
-  esac
- ;;
-  :H)
-  #
-  # CONFIG_HEADER
-  #
-    # First, check the format of the line:
-    cat >"$tmp/defines.sed" <<\CEOF
-/^[	 ]*#[	 ]*undef[	 ][	 ]*[_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ][_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]*[	 ]*$/b def
-/^[	 ]*#[	 ]*define[	 ][	 ]*[_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ][_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]*[(	 ]/b def
-b
-:def
-s/$/ /
-s,^\([	 #]*\)[^	 ]*\([	 ]*PACKAGE_NAME\)[	 (].*,\1define\2 "ncview" ,
-s,^\([	 #]*\)[^	 ]*\([	 ]*PACKAGE_TARNAME\)[	 (].*,\1define\2 "ncview" ,
-s,^\([	 #]*\)[^	 ]*\([	 ]*PACKAGE_VERSION\)[	 (].*,\1define\2 "2.0.0" ,
-s,^\([	 #]*\)[^	 ]*\([	 ]*PACKAGE_STRING\)[	 (].*,\1define\2 "ncview 2.0.0" ,
-s,^\([	 #]*\)[^	 ]*\([	 ]*PACKAGE_BUGREPORT\)[	 (].*,\1define\2 "dpierce at ucsd.edu" ,
-s,^\([	 #]*\)[^	 ]*\([	 ]*HAVE_NETCDF\)[	 (].*,\1define\2 1 ,
-s,^\([	 #]*\)[^	 ]*\([	 ]*HAVE_NETCDF4\)[	 (].*,\1define\2 1 ,
-s,^\([	 #]*\)[^	 ]*\([	 ]*STDC_HEADERS\)[	 (].*,\1define\2 1 ,
-s,^\([	 #]*\)[^	 ]*\([	 ]*PACKAGE\)[	 (].*,\1define\2 "ncview" ,
-s,^\([	 #]*\)[^	 ]*\([	 ]*VERSION\)[	 (].*,\1define\2 "2.0.0" ,
-s,^\([	 #]*\)[^	 ]*\([	 ]*HAVE_LIBXT\)[	 (].*,\1define\2 1 ,
-s,^\([	 #]*\)[^	 ]*\([	 ]*HAVE_LIBXAW\)[	 (].*,\1define\2 1 ,
-s,^\([	 #]*\)[^	 ]*\([	 ]*HAVE_SYS_TYPES_H\)[	 (].*,\1define\2 1 ,
-s,^\([	 #]*\)[^	 ]*\([	 ]*HAVE_SYS_STAT_H\)[	 (].*,\1define\2 1 ,
-s,^\([	 #]*\)[^	 ]*\([	 ]*HAVE_STDLIB_H\)[	 (].*,\1define\2 1 ,
-s,^\([	 #]*\)[^	 ]*\([	 ]*HAVE_STRING_H\)[	 (].*,\1define\2 1 ,
-s,^\([	 #]*\)[^	 ]*\([	 ]*HAVE_MEMORY_H\)[	 (].*,\1define\2 1 ,
-s,^\([	 #]*\)[^	 ]*\([	 ]*HAVE_STRINGS_H\)[	 (].*,\1define\2 1 ,
-s,^\([	 #]*\)[^	 ]*\([	 ]*HAVE_INTTYPES_H\)[	 (].*,\1define\2 1 ,
-s,^\([	 #]*\)[^	 ]*\([	 ]*HAVE_STDINT_H\)[	 (].*,\1define\2 1 ,
-s,^\([	 #]*\)[^	 ]*\([	 ]*HAVE_UNISTD_H\)[	 (].*,\1define\2 1 ,
-s,^\([	 #]*\)[^	 ]*\([	 ]*HAVE_LIBX11\)[	 (].*,\1define\2 1 ,
-s,^\([	 #]*\)[^	 ]*\([	 ]*HAVE_UDUNITS2\)[	 (].*,\1define\2 1 ,
-s,^\([	 #]*\)[^	 ]*\([	 ]*HAVE_LIBEXPAT\)[	 (].*,\1define\2 1 ,
-s/ $//
-s,^[	 #]*u.*,/* & */,
-CEOF
-    sed -f "$tmp/defines.sed" $ac_file_inputs >"$tmp/out1"
-ac_result="$tmp/out1"
-  if test x"$ac_file" != x-; then
-    echo "/* $configure_input  */" >"$tmp/config.h"
-    cat "$ac_result" >>"$tmp/config.h"
-    if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
-      { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
-echo "$as_me: $ac_file is unchanged" >&6;}
-    else
-      rm -f $ac_file
-      mv "$tmp/config.h" $ac_file
-    fi
-  else
-    echo "/* $configure_input  */"
-    cat "$ac_result"
-  fi
-  rm -f "$tmp/out12"
-# Compute $ac_file's index in $config_headers.
-_am_arg=$ac_file
-_am_stamp_count=1
-for _am_header in $config_headers :; do
-  case $_am_header in
-    $_am_arg | $_am_arg:* )
-      break ;;
-    * )
-      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
-  esac
-done
-echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
-$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$_am_arg" : 'X\(//\)[^/]' \| \
-	 X"$_am_arg" : 'X\(//\)$' \| \
-	 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$_am_arg" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`/stamp-h$_am_stamp_count
- ;;
-
-  :C)  { echo "$as_me:$LINENO: executing $ac_file commands" >&5
-echo "$as_me: executing $ac_file commands" >&6;}
- ;;
-  esac
-
-
-  case $ac_file$ac_mode in
-    "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
-  # Strip MF so we end up with the name of the file.
-  mf=`echo "$mf" | sed -e 's/:.*$//'`
-  # Check whether this is an Automake generated Makefile or not.
-  # We used to match only the files named `Makefile.in', but
-  # some people rename them; so instead we look at the file content.
-  # Grep'ing the first line is not enough: some people post-process
-  # each Makefile.in and add a new line on top of each file to say so.
-  # Grep'ing the whole file is not good either: AIX grep has a line
-  # limit of 2048, but all sed's we know have understand at least 4000.
-  if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
-    dirpart=`$as_dirname -- "$mf" ||
-$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$mf" : 'X\(//\)[^/]' \| \
-	 X"$mf" : 'X\(//\)$' \| \
-	 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$mf" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-  else
-    continue
-  fi
-  # Extract the definition of DEPDIR, am__include, and am__quote
-  # from the Makefile without running `make'.
-  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-  test -z "$DEPDIR" && continue
-  am__include=`sed -n 's/^am__include = //p' < "$mf"`
-  test -z "am__include" && continue
-  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-  # When using ansi2knr, U may be empty or an underscore; expand it
-  U=`sed -n 's/^U = //p' < "$mf"`
-  # Find all dependency output files, they are included files with
-  # $(DEPDIR) in their names.  We invoke sed twice because it is the
-  # simplest approach to changing $(DEPDIR) to its actual value in the
-  # expansion.
-  for file in `sed -n "
-    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
-    # Make sure the directory exists.
-    test -f "$dirpart/$file" && continue
-    fdir=`$as_dirname -- "$file" ||
-$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$file" : 'X\(//\)[^/]' \| \
-	 X"$file" : 'X\(//\)$' \| \
-	 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$file" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-    { as_dir=$dirpart/$fdir
-  case $as_dir in #(
-  -*) as_dir=./$as_dir;;
-  esac
-  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
-    as_dirs=
-    while :; do
-      case $as_dir in #(
-      *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
-      *) as_qdir=$as_dir;;
-      esac
-      as_dirs="'$as_qdir' $as_dirs"
-      as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$as_dir" : 'X\(//\)[^/]' \| \
-	 X"$as_dir" : 'X\(//\)$' \| \
-	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-      test -d "$as_dir" && break
-    done
-    test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-echo "$as_me: error: cannot create directory $as_dir" >&2;}
-   { (exit 1); exit 1; }; }; }
-    # echo "creating $dirpart/$file"
-    echo '# dummy' > "$dirpart/$file"
-  done
-done
- ;;
-
-  esac
-done # for ac_tag
-
-
-{ (exit 0); exit 0; }
diff --git a/configure b/configure
index 09b3205..b80ae96 100755
--- a/configure
+++ b/configure
@@ -712,13 +712,13 @@ DO_UDUNITS2_LINE
 DO_UDUNITS2_INCDIR
 DO_UDUNITS2_LIBDIR
 DO_UDUNITS2_LIBNAME
-PPM_INCDIR
-PPM_LIBDIR
-PPM_LIBNAME
-DO_PPM_LINE
-DO_PPM_INCDIR
-DO_PPM_LIBDIR
-DO_PPM_LIBNAME
+PNG_CPPFLAGS
+PNG_LDFLAGS
+PNG_LIBS
+DO_PNG_LINE
+DO_PNG_INCDIR
+DO_PNG_LIBDIR
+DO_PNG_LIBNAME
 PREFIX
 X_INCLUDES
 RPATH_FLAGS
@@ -1324,8 +1324,8 @@ Optional Packages:
   --with-x                use the X Window System
   --with-udunits2_incdir=dir directory containing udunits2 includes
   --with-udunits2_libdir=dir directory containing udunits2 library
-  --with-ppm_incdir=dir directory containing ppm includes
-  --with-ppm_libdir=dir directory containing ppm library
+  --with-png_incdir=dir directory containing png includes
+  --with-png_libdir=dir directory containing png library
 
 Some influential environment variables:
   CC          C compiler command
@@ -5430,6 +5430,8 @@ fi
 
 if test x"$haveAthena"x = "xnox"; then
 	haveAthena=yes
+	{ echo "$as_me:$LINENO: checking for the Athena 3d widgets instead" >&5
+echo $ECHO_N "checking for the Athena 3d widgets instead... $ECHO_C" >&6; }
 
 { echo "$as_me:$LINENO: checking for XawScrollbarSetThumb in -lXaw3d" >&5
 echo $ECHO_N "checking for XawScrollbarSetThumb in -lXaw3d... $ECHO_C" >&6; }
@@ -5848,14 +5850,71 @@ fi
 
 
 if test x"$haveAthena"x != "xyesx"; then
-  { { echo "$as_me:$LINENO: error: Could not find Athena widgets library and header.  Use your package manager to install the X windows development libraries and headers." >&5
-echo "$as_me: error: Could not find Athena widgets library and header.  Use your package manager to install the X windows development libraries and headers." >&2;}
+  # On AIX this fails because the Xmu header needs to be there as well...
+  { echo "$as_me:$LINENO: checking for X11/Xaw/Simple.h" >&5
+echo $ECHO_N "checking for X11/Xaw/Simple.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_X11_Xaw_Simple_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include<X11/Xmu/Xmu.h>
+
+
+#include <X11/Xaw/Simple.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_header_X11_Xaw_Simple_h=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_header_X11_Xaw_Simple_h=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xaw_Simple_h" >&5
+echo "${ECHO_T}$ac_cv_header_X11_Xaw_Simple_h" >&6; }
+if test $ac_cv_header_X11_Xaw_Simple_h = yes; then
+  :
+else
+  haveAthena=no
+fi
+
+
+  if test x"$haveAthena"x != "xyesx"; then
+    { { echo "$as_me:$LINENO: error: Could not find Athena widgets library and header (checked w/Xmu.h included as well).  Use your package manager to install the X windows development libraries and headers." >&5
+echo "$as_me: error: Could not find Athena widgets library and header (checked w/Xmu.h included as well).  Use your package manager to install the X windows development libraries and headers." >&2;}
    { (exit 1); exit 1; }; }
+  fi
 fi
 XAW_LIBS=$LIBS
 echo "X Athena widget (Xaw) libraries: $XAW_LIBS"
 
 LIBS=$LIBSsave
+CFLAGS=$CFLAGSsave
 
 #------------------------------------------------------------------------------
 # Check for X11 library. It's not clear to me why this is necessary, yet Darwin
@@ -5952,6 +6011,7 @@ X11_LIBS=$LIBS
 echo "X11 libraries: $X11_LIBS"
 
 LIBS=$LIBSsave
+CFLAGS=$CFLAGSsave
 
 # Handle udunits2
 
@@ -6945,8 +7005,12 @@ fi
 
 
 fi
+UDUNITS2_INC_PRESENT=no
 if test x$UDUNITS2_INCDIR != x; then
+	UDUNITS2_INC_PRESENT=yes
         UDUNITS2_CPPFLAGS=-I$UDUNITS2_INCDIR
+else
+	echo "** Could not find the udunits2.h file, udunits support will not be included **"
 fi
 UDUNITS2_LIBNAME=libudunits2.a
 
@@ -7181,15 +7245,17 @@ fi
 fi
 UDUNITS2_LIBNAME=`echo $UDUNITS2_LIBNAME | sed s/lib// | sed s/\.a//`
 UDUNITS2_PRESENT=no
-if test x$UDUNITS2_LIBDIR != x; then
-	UDUNITS2_PRESENT=yes
-	UDUNITS2_LIBS=-l$UDUNITS2_LIBNAME
-        UDUNITS2_LDFLAGS="-L$UDUNITS2_LIBDIR $UDUNITS2_LIBS"
+if test $UDUNITS2_INC_PRESENT = yes; then
+	if test x$UDUNITS2_LIBDIR != x; then
+		UDUNITS2_PRESENT=yes
+		UDUNITS2_LIBS=-l$UDUNITS2_LIBNAME
+		UDUNITS2_LDFLAGS="-L$UDUNITS2_LIBDIR $UDUNITS2_LIBS"
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_UDUNITS2 1
 _ACEOF
 
+	fi
 fi
 if test $UDUNITS2_PRESENT = yes; then
 	haveExpat=yes
@@ -7283,6 +7349,7 @@ echo "$as_me: error: Could not find the expat library despite the fact that the
 	echo "Expat libraries (needed by udunits2): $EXPAT_LIBS"
 	UDUNITS2_LDFLAGS="$UDUNITS2_LDFLAGS $LIBS"
 	LIBS=$LIBSsave
+	CFLAGS=$CFLAGSsave
 fi
 
 
@@ -7326,20 +7393,20 @@ fi
 
 
 
-# Handle ppm
+# Handle png
 
 
-# Check whether --with-ppm_incdir was given.
-if test "${with_ppm_incdir+set}" = set; then
-  withval=$with_ppm_incdir; PPM_INCDIR=$withval
+# Check whether --with-png_incdir was given.
+if test "${with_png_incdir+set}" = set; then
+  withval=$with_png_incdir; PNG_INCDIR=$withval
 fi
 
 err=0
-if test x$PPM_INCDIR != x; then
-        as_ac_Header=`echo "ac_cv_header_$PPM_INCDIR/ppm.h" | $as_tr_sh`
+if test x$PNG_INCDIR != x; then
+        as_ac_Header=`echo "ac_cv_header_$PNG_INCDIR/png.h" | $as_tr_sh`
 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { echo "$as_me:$LINENO: checking for $PPM_INCDIR/ppm.h" >&5
-echo $ECHO_N "checking for $PPM_INCDIR/ppm.h... $ECHO_C" >&6; }
+  { echo "$as_me:$LINENO: checking for $PNG_INCDIR/png.h" >&5
+echo $ECHO_N "checking for $PNG_INCDIR/png.h... $ECHO_C" >&6; }
 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
@@ -7348,8 +7415,8 @@ ac_res=`eval echo '${'$as_ac_Header'}'`
 echo "${ECHO_T}$ac_res" >&6; }
 else
   # Is the header compilable?
-{ echo "$as_me:$LINENO: checking $PPM_INCDIR/ppm.h usability" >&5
-echo $ECHO_N "checking $PPM_INCDIR/ppm.h usability... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking $PNG_INCDIR/png.h usability" >&5
+echo $ECHO_N "checking $PNG_INCDIR/png.h usability... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -7357,7 +7424,7 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-#include <$PPM_INCDIR/ppm.h>
+#include <$PNG_INCDIR/png.h>
 _ACEOF
 rm -f conftest.$ac_objext
 if { (ac_try="$ac_compile"
@@ -7389,15 +7456,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 echo "${ECHO_T}$ac_header_compiler" >&6; }
 
 # Is the header present?
-{ echo "$as_me:$LINENO: checking $PPM_INCDIR/ppm.h presence" >&5
-echo $ECHO_N "checking $PPM_INCDIR/ppm.h presence... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking $PNG_INCDIR/png.h presence" >&5
+echo $ECHO_N "checking $PNG_INCDIR/png.h presence... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <$PPM_INCDIR/ppm.h>
+#include <$PNG_INCDIR/png.h>
 _ACEOF
 if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
@@ -7430,25 +7497,25 @@ echo "${ECHO_T}$ac_header_preproc" >&6; }
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
   yes:no: )
-    { echo "$as_me:$LINENO: WARNING: $PPM_INCDIR/ppm.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $PPM_INCDIR/ppm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $PPM_INCDIR/ppm.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $PPM_INCDIR/ppm.h: proceeding with the compiler's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $PNG_INCDIR/png.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $PNG_INCDIR/png.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $PNG_INCDIR/png.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $PNG_INCDIR/png.h: proceeding with the compiler's result" >&2;}
     ac_header_preproc=yes
     ;;
   no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: $PPM_INCDIR/ppm.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $PPM_INCDIR/ppm.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $PPM_INCDIR/ppm.h:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $PPM_INCDIR/ppm.h:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $PPM_INCDIR/ppm.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $PPM_INCDIR/ppm.h: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $PPM_INCDIR/ppm.h:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $PPM_INCDIR/ppm.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $PPM_INCDIR/ppm.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $PPM_INCDIR/ppm.h: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $PPM_INCDIR/ppm.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $PPM_INCDIR/ppm.h: in the future, the compiler will take precedence" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $PNG_INCDIR/png.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $PNG_INCDIR/png.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $PNG_INCDIR/png.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $PNG_INCDIR/png.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $PNG_INCDIR/png.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $PNG_INCDIR/png.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $PNG_INCDIR/png.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $PNG_INCDIR/png.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $PNG_INCDIR/png.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $PNG_INCDIR/png.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $PNG_INCDIR/png.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $PNG_INCDIR/png.h: in the future, the compiler will take precedence" >&2;}
     ( cat <<\_ASBOX
 ## ------------------------------- ##
 ## Report this to dpierce at ucsd.edu ##
@@ -7457,8 +7524,8 @@ _ASBOX
      ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
-{ echo "$as_me:$LINENO: checking for $PPM_INCDIR/ppm.h" >&5
-echo $ECHO_N "checking for $PPM_INCDIR/ppm.h... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking for $PNG_INCDIR/png.h" >&5
+echo $ECHO_N "checking for $PNG_INCDIR/png.h... $ECHO_C" >&6; }
 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -7470,30 +7537,38 @@ echo "${ECHO_T}$ac_res" >&6; }
 
 fi
 if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  echo "Using user-specified ppm include dir=$PPM_INCDIR"
+  echo "Using user-specified png include dir=$PNG_INCDIR"
 else
   err=1
 fi
 
 
+	if test $err -eq 1; then
+		echo "--------------------------------------------------------------------------------"
+		echo "Error: You specified that the pnginclude directory is $PNG_INCDIR"
+		echo "but that directory does NOT have required png include file png.h."
+		echo "You must specify a directory that has the png include files"
+		echo "--------------------------------------------------------------------------------"
+		exit -1
+	fi
 fi
 if test $err -eq 1; then
-        echo "Error: user specified ppm include directory does not have ppm.h!"
+        echo "Error: user specified png include directory does not have png.h!"
         exit -1
 fi
-if test x$PPM_INCDIR = x; then
-        if test "${ac_cv_header__usr_local_include_ppm_h+set}" = set; then
-  { echo "$as_me:$LINENO: checking for /usr/local/include/ppm.h" >&5
-echo $ECHO_N "checking for /usr/local/include/ppm.h... $ECHO_C" >&6; }
-if test "${ac_cv_header__usr_local_include_ppm_h+set}" = set; then
+if test x$PNG_INCDIR = x; then
+        if test "${ac_cv_header_png_h+set}" = set; then
+  { echo "$as_me:$LINENO: checking for png.h" >&5
+echo $ECHO_N "checking for png.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_png_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header__usr_local_include_ppm_h" >&5
-echo "${ECHO_T}$ac_cv_header__usr_local_include_ppm_h" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_header_png_h" >&5
+echo "${ECHO_T}$ac_cv_header_png_h" >&6; }
 else
   # Is the header compilable?
-{ echo "$as_me:$LINENO: checking /usr/local/include/ppm.h usability" >&5
-echo $ECHO_N "checking /usr/local/include/ppm.h usability... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking png.h usability" >&5
+echo $ECHO_N "checking png.h usability... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -7501,7 +7576,7 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-#include </usr/local/include/ppm.h>
+#include <png.h>
 _ACEOF
 rm -f conftest.$ac_objext
 if { (ac_try="$ac_compile"
@@ -7533,15 +7608,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 echo "${ECHO_T}$ac_header_compiler" >&6; }
 
 # Is the header present?
-{ echo "$as_me:$LINENO: checking /usr/local/include/ppm.h presence" >&5
-echo $ECHO_N "checking /usr/local/include/ppm.h presence... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking png.h presence" >&5
+echo $ECHO_N "checking png.h presence... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include </usr/local/include/ppm.h>
+#include <png.h>
 _ACEOF
 if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
@@ -7574,25 +7649,25 @@ echo "${ECHO_T}$ac_header_preproc" >&6; }
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
   yes:no: )
-    { echo "$as_me:$LINENO: WARNING: /usr/local/include/ppm.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: /usr/local/include/ppm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: /usr/local/include/ppm.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: /usr/local/include/ppm.h: proceeding with the compiler's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: png.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: png.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: png.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: png.h: proceeding with the compiler's result" >&2;}
     ac_header_preproc=yes
     ;;
   no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: /usr/local/include/ppm.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: /usr/local/include/ppm.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: /usr/local/include/ppm.h:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: /usr/local/include/ppm.h:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: /usr/local/include/ppm.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: /usr/local/include/ppm.h: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: /usr/local/include/ppm.h:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: /usr/local/include/ppm.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: /usr/local/include/ppm.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: /usr/local/include/ppm.h: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: /usr/local/include/ppm.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: /usr/local/include/ppm.h: in the future, the compiler will take precedence" >&2;}
+    { echo "$as_me:$LINENO: WARNING: png.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: png.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: png.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: png.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: png.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: png.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: png.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: png.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: png.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: png.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: png.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: png.h: in the future, the compiler will take precedence" >&2;}
     ( cat <<\_ASBOX
 ## ------------------------------- ##
 ## Report this to dpierce at ucsd.edu ##
@@ -7601,36 +7676,36 @@ _ASBOX
      ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
-{ echo "$as_me:$LINENO: checking for /usr/local/include/ppm.h" >&5
-echo $ECHO_N "checking for /usr/local/include/ppm.h... $ECHO_C" >&6; }
-if test "${ac_cv_header__usr_local_include_ppm_h+set}" = set; then
+{ echo "$as_me:$LINENO: checking for png.h" >&5
+echo $ECHO_N "checking for png.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_png_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_cv_header__usr_local_include_ppm_h=$ac_header_preproc
+  ac_cv_header_png_h=$ac_header_preproc
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header__usr_local_include_ppm_h" >&5
-echo "${ECHO_T}$ac_cv_header__usr_local_include_ppm_h" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_header_png_h" >&5
+echo "${ECHO_T}$ac_cv_header_png_h" >&6; }
 
 fi
-if test $ac_cv_header__usr_local_include_ppm_h = yes; then
-  PPM_INCDIR=/usr/local/include
+if test $ac_cv_header_png_h = yes; then
+  PNG_INCDIR=.
 fi
 
 
 fi
-if test x$PPM_INCDIR = x; then
-        if test "${ac_cv_header__usr_include_ppm_h+set}" = set; then
-  { echo "$as_me:$LINENO: checking for /usr/include/ppm.h" >&5
-echo $ECHO_N "checking for /usr/include/ppm.h... $ECHO_C" >&6; }
-if test "${ac_cv_header__usr_include_ppm_h+set}" = set; then
+if test x$PNG_INCDIR = x; then
+        if test "${ac_cv_header__usr_local_include_png_h+set}" = set; then
+  { echo "$as_me:$LINENO: checking for /usr/local/include/png.h" >&5
+echo $ECHO_N "checking for /usr/local/include/png.h... $ECHO_C" >&6; }
+if test "${ac_cv_header__usr_local_include_png_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header__usr_include_ppm_h" >&5
-echo "${ECHO_T}$ac_cv_header__usr_include_ppm_h" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_header__usr_local_include_png_h" >&5
+echo "${ECHO_T}$ac_cv_header__usr_local_include_png_h" >&6; }
 else
   # Is the header compilable?
-{ echo "$as_me:$LINENO: checking /usr/include/ppm.h usability" >&5
-echo $ECHO_N "checking /usr/include/ppm.h usability... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking /usr/local/include/png.h usability" >&5
+echo $ECHO_N "checking /usr/local/include/png.h usability... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -7638,7 +7713,7 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-#include </usr/include/ppm.h>
+#include </usr/local/include/png.h>
 _ACEOF
 rm -f conftest.$ac_objext
 if { (ac_try="$ac_compile"
@@ -7670,15 +7745,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 echo "${ECHO_T}$ac_header_compiler" >&6; }
 
 # Is the header present?
-{ echo "$as_me:$LINENO: checking /usr/include/ppm.h presence" >&5
-echo $ECHO_N "checking /usr/include/ppm.h presence... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking /usr/local/include/png.h presence" >&5
+echo $ECHO_N "checking /usr/local/include/png.h presence... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include </usr/include/ppm.h>
+#include </usr/local/include/png.h>
 _ACEOF
 if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
@@ -7711,25 +7786,25 @@ echo "${ECHO_T}$ac_header_preproc" >&6; }
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
   yes:no: )
-    { echo "$as_me:$LINENO: WARNING: /usr/include/ppm.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: /usr/include/ppm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: /usr/include/ppm.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: /usr/include/ppm.h: proceeding with the compiler's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/local/include/png.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: /usr/local/include/png.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/local/include/png.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: /usr/local/include/png.h: proceeding with the compiler's result" >&2;}
     ac_header_preproc=yes
     ;;
   no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: /usr/include/ppm.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: /usr/include/ppm.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: /usr/include/ppm.h:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: /usr/include/ppm.h:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: /usr/include/ppm.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: /usr/include/ppm.h: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: /usr/include/ppm.h:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: /usr/include/ppm.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: /usr/include/ppm.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: /usr/include/ppm.h: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: /usr/include/ppm.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: /usr/include/ppm.h: in the future, the compiler will take precedence" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/local/include/png.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: /usr/local/include/png.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/local/include/png.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: /usr/local/include/png.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/local/include/png.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: /usr/local/include/png.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/local/include/png.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: /usr/local/include/png.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/local/include/png.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: /usr/local/include/png.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/local/include/png.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: /usr/local/include/png.h: in the future, the compiler will take precedence" >&2;}
     ( cat <<\_ASBOX
 ## ------------------------------- ##
 ## Report this to dpierce at ucsd.edu ##
@@ -7738,38 +7813,36 @@ _ASBOX
      ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
-{ echo "$as_me:$LINENO: checking for /usr/include/ppm.h" >&5
-echo $ECHO_N "checking for /usr/include/ppm.h... $ECHO_C" >&6; }
-if test "${ac_cv_header__usr_include_ppm_h+set}" = set; then
+{ echo "$as_me:$LINENO: checking for /usr/local/include/png.h" >&5
+echo $ECHO_N "checking for /usr/local/include/png.h... $ECHO_C" >&6; }
+if test "${ac_cv_header__usr_local_include_png_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_cv_header__usr_include_ppm_h=$ac_header_preproc
+  ac_cv_header__usr_local_include_png_h=$ac_header_preproc
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header__usr_include_ppm_h" >&5
-echo "${ECHO_T}$ac_cv_header__usr_include_ppm_h" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_header__usr_local_include_png_h" >&5
+echo "${ECHO_T}$ac_cv_header__usr_local_include_png_h" >&6; }
 
 fi
-if test $ac_cv_header__usr_include_ppm_h = yes; then
-  PPM_INCDIR=/usr/include
+if test $ac_cv_header__usr_local_include_png_h = yes; then
+  PNG_INCDIR=/usr/local/include
 fi
 
 
 fi
-if test x$PPM_INCDIR = x; then
-        as_ac_Header=`echo "ac_cv_header_$HOME/include/ppm.h" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { echo "$as_me:$LINENO: checking for $HOME/include/ppm.h" >&5
-echo $ECHO_N "checking for $HOME/include/ppm.h... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+if test x$PNG_INCDIR = x; then
+        if test "${ac_cv_header__usr_include_png_h+set}" = set; then
+  { echo "$as_me:$LINENO: checking for /usr/include/png.h" >&5
+echo $ECHO_N "checking for /usr/include/png.h... $ECHO_C" >&6; }
+if test "${ac_cv_header__usr_include_png_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_header__usr_include_png_h" >&5
+echo "${ECHO_T}$ac_cv_header__usr_include_png_h" >&6; }
 else
   # Is the header compilable?
-{ echo "$as_me:$LINENO: checking $HOME/include/ppm.h usability" >&5
-echo $ECHO_N "checking $HOME/include/ppm.h usability... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking /usr/include/png.h usability" >&5
+echo $ECHO_N "checking /usr/include/png.h usability... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -7777,7 +7850,7 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-#include <$HOME/include/ppm.h>
+#include </usr/include/png.h>
 _ACEOF
 rm -f conftest.$ac_objext
 if { (ac_try="$ac_compile"
@@ -7809,15 +7882,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 echo "${ECHO_T}$ac_header_compiler" >&6; }
 
 # Is the header present?
-{ echo "$as_me:$LINENO: checking $HOME/include/ppm.h presence" >&5
-echo $ECHO_N "checking $HOME/include/ppm.h presence... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking /usr/include/png.h presence" >&5
+echo $ECHO_N "checking /usr/include/png.h presence... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <$HOME/include/ppm.h>
+#include </usr/include/png.h>
 _ACEOF
 if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
@@ -7850,25 +7923,25 @@ echo "${ECHO_T}$ac_header_preproc" >&6; }
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
   yes:no: )
-    { echo "$as_me:$LINENO: WARNING: $HOME/include/ppm.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $HOME/include/ppm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $HOME/include/ppm.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $HOME/include/ppm.h: proceeding with the compiler's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/include/png.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: /usr/include/png.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/include/png.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: /usr/include/png.h: proceeding with the compiler's result" >&2;}
     ac_header_preproc=yes
     ;;
   no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: $HOME/include/ppm.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $HOME/include/ppm.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $HOME/include/ppm.h:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $HOME/include/ppm.h:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $HOME/include/ppm.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $HOME/include/ppm.h: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $HOME/include/ppm.h:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $HOME/include/ppm.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $HOME/include/ppm.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $HOME/include/ppm.h: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $HOME/include/ppm.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $HOME/include/ppm.h: in the future, the compiler will take precedence" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/include/png.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: /usr/include/png.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/include/png.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: /usr/include/png.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/include/png.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: /usr/include/png.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/include/png.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: /usr/include/png.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/include/png.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: /usr/include/png.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/include/png.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: /usr/include/png.h: in the future, the compiler will take precedence" >&2;}
     ( cat <<\_ASBOX
 ## ------------------------------- ##
 ## Report this to dpierce at ucsd.edu ##
@@ -7877,101 +7950,193 @@ _ASBOX
      ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
-{ echo "$as_me:$LINENO: checking for $HOME/include/ppm.h" >&5
-echo $ECHO_N "checking for $HOME/include/ppm.h... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+{ echo "$as_me:$LINENO: checking for /usr/include/png.h" >&5
+echo $ECHO_N "checking for /usr/include/png.h... $ECHO_C" >&6; }
+if test "${ac_cv_header__usr_include_png_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  eval "$as_ac_Header=\$ac_header_preproc"
+  ac_cv_header__usr_include_png_h=$ac_header_preproc
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header__usr_include_png_h" >&5
+echo "${ECHO_T}$ac_cv_header__usr_include_png_h" >&6; }
+
+fi
+if test $ac_cv_header__usr_include_png_h = yes; then
+  PNG_INCDIR=/usr/include
+fi
+
+
+fi
+if test x$PNG_INCDIR = x; then
+        as_ac_Header=`echo "ac_cv_header_$HOME/include/png.h" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $HOME/include/png.h" >&5
+echo $ECHO_N "checking for $HOME/include/png.h... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
 ac_res=`eval echo '${'$as_ac_Header'}'`
 	       { echo "$as_me:$LINENO: result: $ac_res" >&5
 echo "${ECHO_T}$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $HOME/include/png.h usability" >&5
+echo $ECHO_N "checking $HOME/include/png.h usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$HOME/include/png.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  PPM_INCDIR=$HOME/include
+	ac_header_compiler=no
 fi
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
 
-fi
-PPM_LIBNAME=libppm.so
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $HOME/include/png.h presence" >&5
+echo $ECHO_N "checking $HOME/include/png.h presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$HOME/include/png.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-# Check whether --with-ppm_libdir was given.
-if test "${with_ppm_libdir+set}" = set; then
-  withval=$with_ppm_libdir; PPM_LIBDIR=$withval
+  ac_header_preproc=no
 fi
 
-err=0
-if test x$PPM_LIBDIR != x; then
-        as_ac_File=`echo "ac_cv_file_$PPM_LIBDIR/$PPM_LIBNAME" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $PPM_LIBDIR/$PPM_LIBNAME" >&5
-echo $ECHO_N "checking for $PPM_LIBDIR/$PPM_LIBNAME... $ECHO_C" >&6; }
-if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $HOME/include/png.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $HOME/include/png.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $HOME/include/png.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $HOME/include/png.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $HOME/include/png.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $HOME/include/png.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $HOME/include/png.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $HOME/include/png.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $HOME/include/png.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $HOME/include/png.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $HOME/include/png.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $HOME/include/png.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $HOME/include/png.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $HOME/include/png.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $HOME/include/png.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $HOME/include/png.h: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ------------------------------- ##
+## Report this to dpierce at ucsd.edu ##
+## ------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for $HOME/include/png.h" >&5
+echo $ECHO_N "checking for $HOME/include/png.h... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  test "$cross_compiling" = yes &&
-  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
-echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
-   { (exit 1); exit 1; }; }
-if test -r "$PPM_LIBDIR/$PPM_LIBNAME"; then
-  eval "$as_ac_File=yes"
-else
-  eval "$as_ac_File=no"
-fi
+  eval "$as_ac_Header=\$ac_header_preproc"
 fi
-ac_res=`eval echo '${'$as_ac_File'}'`
+ac_res=`eval echo '${'$as_ac_Header'}'`
 	       { echo "$as_me:$LINENO: result: $ac_res" >&5
 echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_File'}'` = yes; then
-  echo "Using user-specified ppm library dir=$PPM_LIBDIR"
-else
-  err=1
-fi
 
 fi
-if test $err -eq 1; then
-        echo "Error: user specified ppm library directory does not have $PPM_LIBNAME !"
-        exit -1
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  PNG_INCDIR=$HOME/include
+fi
+
+
 fi
-if test x$PPM_LIBDIR = x; then
-	{ echo "$as_me:$LINENO: checking for ppm_writeppm in -lppm" >&5
-echo $ECHO_N "checking for ppm_writeppm in -lppm... $ECHO_C" >&6; }
-if test "${ac_cv_lib_ppm_ppm_writeppm+set}" = set; then
+if test x$PNG_INCDIR = x; then
+        if test "${ac_cv_header__sw_include_png_h+set}" = set; then
+  { echo "$as_me:$LINENO: checking for /sw/include/png.h" >&5
+echo $ECHO_N "checking for /sw/include/png.h... $ECHO_C" >&6; }
+if test "${ac_cv_header__sw_include_png_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header__sw_include_png_h" >&5
+echo "${ECHO_T}$ac_cv_header__sw_include_png_h" >&6; }
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lppm  $LIBS"
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking /sw/include/png.h usability" >&5
+echo $ECHO_N "checking /sw/include/png.h usability... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char ppm_writeppm ();
-int
-main ()
-{
-return ppm_writeppm ();
-  ;
-  return 0;
-}
+$ac_includes_default
+#include </sw/include/png.h>
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -7980,106 +8145,125 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_ppm_ppm_writeppm=yes
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	ac_cv_lib_ppm_ppm_writeppm=no
+	ac_header_compiler=no
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_ppm_ppm_writeppm" >&5
-echo "${ECHO_T}$ac_cv_lib_ppm_ppm_writeppm" >&6; }
-if test $ac_cv_lib_ppm_ppm_writeppm = yes; then
-  PPM_LIBDIR=.
-fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
 
-fi
-if test x$PPM_LIBDIR = x; then
-        as_ac_File=`echo "ac_cv_file_/usr/local/lib/$PPM_LIBNAME" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for /usr/local/lib/$PPM_LIBNAME" >&5
-echo $ECHO_N "checking for /usr/local/lib/$PPM_LIBNAME... $ECHO_C" >&6; }
-if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  test "$cross_compiling" = yes &&
-  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
-echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
-   { (exit 1); exit 1; }; }
-if test -r "/usr/local/lib/$PPM_LIBNAME"; then
-  eval "$as_ac_File=yes"
+# Is the header present?
+{ echo "$as_me:$LINENO: checking /sw/include/png.h presence" >&5
+echo $ECHO_N "checking /sw/include/png.h presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include </sw/include/png.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
 else
-  eval "$as_ac_File=no"
-fi
-fi
-ac_res=`eval echo '${'$as_ac_File'}'`
-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_File'}'` = yes; then
-  PPM_LIBDIR=/usr/local/lib
-fi
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+  ac_header_preproc=no
 fi
-if test x$PPM_LIBDIR = x; then
-        as_ac_File=`echo "ac_cv_file_/usr/lib/$PPM_LIBNAME" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for /usr/lib/$PPM_LIBNAME" >&5
-echo $ECHO_N "checking for /usr/lib/$PPM_LIBNAME... $ECHO_C" >&6; }
-if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: /sw/include/png.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: /sw/include/png.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /sw/include/png.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: /sw/include/png.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: /sw/include/png.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: /sw/include/png.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /sw/include/png.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: /sw/include/png.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /sw/include/png.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: /sw/include/png.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /sw/include/png.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: /sw/include/png.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /sw/include/png.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: /sw/include/png.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /sw/include/png.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: /sw/include/png.h: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ------------------------------- ##
+## Report this to dpierce at ucsd.edu ##
+## ------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for /sw/include/png.h" >&5
+echo $ECHO_N "checking for /sw/include/png.h... $ECHO_C" >&6; }
+if test "${ac_cv_header__sw_include_png_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  test "$cross_compiling" = yes &&
-  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
-echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
-   { (exit 1); exit 1; }; }
-if test -r "/usr/lib/$PPM_LIBNAME"; then
-  eval "$as_ac_File=yes"
-else
-  eval "$as_ac_File=no"
+  ac_cv_header__sw_include_png_h=$ac_header_preproc
 fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header__sw_include_png_h" >&5
+echo "${ECHO_T}$ac_cv_header__sw_include_png_h" >&6; }
+
 fi
-ac_res=`eval echo '${'$as_ac_File'}'`
-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_File'}'` = yes; then
-  PPM_LIBDIR=/usr/lib
+if test $ac_cv_header__sw_include_png_h = yes; then
+  PNG_INCDIR=/sw/include
 fi
 
+
 fi
-if test x$PPM_LIBDIR = x; then
-        as_ac_File=`echo "ac_cv_file_/lib/$PPM_LIBNAME" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for /lib/$PPM_LIBNAME" >&5
-echo $ECHO_N "checking for /lib/$PPM_LIBNAME... $ECHO_C" >&6; }
-if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+PNG_INC_PRESENT=no
+if test x$PNG_INCDIR != x; then
+	PNG_INC_PRESENT=yes
+        PNG_CPPFLAGS=-I$PNG_INCDIR
 else
-  test "$cross_compiling" = yes &&
-  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
-echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
-   { (exit 1); exit 1; }; }
-if test -r "/lib/$PPM_LIBNAME"; then
-  eval "$as_ac_File=yes"
-else
-  eval "$as_ac_File=no"
-fi
-fi
-ac_res=`eval echo '${'$as_ac_File'}'`
-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_File'}'` = yes; then
-  PPM_LIBDIR=/lib
+	echo "** Could not find the png.h file, so -frames support will not be included  **"
+	echo "** Install the PNG library (and development headers) to fix this           **"
 fi
+PNG_LIBNAME=libpng.so
 
+# Check whether --with-png_libdir was given.
+if test "${with_png_libdir+set}" = set; then
+  withval=$with_png_libdir; PNG_LIBDIR=$withval
 fi
-if test x$PPM_LIBDIR = x; then
-        as_ac_File=`echo "ac_cv_file_$HOME/lib/$PPM_LIBNAME" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $HOME/lib/$PPM_LIBNAME" >&5
-echo $ECHO_N "checking for $HOME/lib/$PPM_LIBNAME... $ECHO_C" >&6; }
+
+err=0
+if test x$PNG_LIBDIR != x; then
+        as_ac_File=`echo "ac_cv_file_$PNG_LIBDIR/$PNG_LIBNAME" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $PNG_LIBDIR/$PNG_LIBNAME" >&5
+echo $ECHO_N "checking for $PNG_LIBDIR/$PNG_LIBNAME... $ECHO_C" >&6; }
 if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -8087,7 +8271,7 @@ else
   { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
 echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
    { (exit 1); exit 1; }; }
-if test -r "$HOME/lib/$PPM_LIBNAME"; then
+if test -r "$PNG_LIBDIR/$PNG_LIBNAME"; then
   eval "$as_ac_File=yes"
 else
   eval "$as_ac_File=no"
@@ -8097,20 +8281,24 @@ ac_res=`eval echo '${'$as_ac_File'}'`
 	       { echo "$as_me:$LINENO: result: $ac_res" >&5
 echo "${ECHO_T}$ac_res" >&6; }
 if test `eval echo '${'$as_ac_File'}'` = yes; then
-  PPM_LIBDIR=$HOME/lib
+  echo "Using user-specified png library dir=$PNG_LIBDIR"
+else
+  err=1
 fi
 
 fi
-if test x$PPM_LIBDIR = x; then
-PPM_LIBNAME=libnetpbm.so
-if test x$PPM_LIBDIR = x; then
-	{ echo "$as_me:$LINENO: checking for ppm_writeppm in -lnetpbm" >&5
-echo $ECHO_N "checking for ppm_writeppm in -lnetpbm... $ECHO_C" >&6; }
-if test "${ac_cv_lib_netpbm_ppm_writeppm+set}" = set; then
+if test $err -eq 1; then
+        echo "Error: user specified png library directory does not have $PNG_LIBNAME !"
+        exit -1
+fi
+if test x$PNG_LIBDIR = x; then
+        { echo "$as_me:$LINENO: checking for png_write_png in -lpng" >&5
+echo $ECHO_N "checking for png_write_png in -lpng... $ECHO_C" >&6; }
+if test "${ac_cv_lib_png_png_write_png+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lnetpbm  $LIBS"
+LIBS="-lpng  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -8124,11 +8312,11 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
-char ppm_writeppm ();
+char png_write_png ();
 int
 main ()
 {
-return ppm_writeppm ();
+return png_write_png ();
   ;
   return 0;
 }
@@ -8151,29 +8339,54 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 	 test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_netpbm_ppm_writeppm=yes
+  ac_cv_lib_png_png_write_png=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	ac_cv_lib_netpbm_ppm_writeppm=no
+	ac_cv_lib_png_png_write_png=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_netpbm_ppm_writeppm" >&5
-echo "${ECHO_T}$ac_cv_lib_netpbm_ppm_writeppm" >&6; }
-if test $ac_cv_lib_netpbm_ppm_writeppm = yes; then
-  PPM_LIBDIR=.
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_write_png" >&5
+echo "${ECHO_T}$ac_cv_lib_png_png_write_png" >&6; }
+if test $ac_cv_lib_png_png_write_png = yes; then
+  PNG_LIBDIR=.
+fi
+
+fi
+if test x$PNG_LIBDIR = x; then
+        as_ac_File=`echo "ac_cv_file_/usr/local/lib/$PNG_LIBNAME" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for /usr/local/lib/$PNG_LIBNAME" >&5
+echo $ECHO_N "checking for /usr/local/lib/$PNG_LIBNAME... $ECHO_C" >&6; }
+if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  test "$cross_compiling" = yes &&
+  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+if test -r "/usr/local/lib/$PNG_LIBNAME"; then
+  eval "$as_ac_File=yes"
+else
+  eval "$as_ac_File=no"
+fi
+fi
+ac_res=`eval echo '${'$as_ac_File'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_File'}'` = yes; then
+  PNG_LIBDIR=/usr/local/lib
 fi
 
 fi
-if test x$PPM_LIBDIR = x; then
-        as_ac_File=`echo "ac_cv_file_/usr/local/lib/$PPM_LIBNAME" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for /usr/local/lib/$PPM_LIBNAME" >&5
-echo $ECHO_N "checking for /usr/local/lib/$PPM_LIBNAME... $ECHO_C" >&6; }
+if test x$PNG_LIBDIR = x; then
+        as_ac_File=`echo "ac_cv_file_/usr/lib/$PNG_LIBNAME" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for /usr/lib/$PNG_LIBNAME" >&5
+echo $ECHO_N "checking for /usr/lib/$PNG_LIBNAME... $ECHO_C" >&6; }
 if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -8181,7 +8394,7 @@ else
   { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
 echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
    { (exit 1); exit 1; }; }
-if test -r "/usr/local/lib/$PPM_LIBNAME"; then
+if test -r "/usr/lib/$PNG_LIBNAME"; then
   eval "$as_ac_File=yes"
 else
   eval "$as_ac_File=no"
@@ -8191,14 +8404,14 @@ ac_res=`eval echo '${'$as_ac_File'}'`
 	       { echo "$as_me:$LINENO: result: $ac_res" >&5
 echo "${ECHO_T}$ac_res" >&6; }
 if test `eval echo '${'$as_ac_File'}'` = yes; then
-  PPM_LIBDIR=/usr/local/lib
+  PNG_LIBDIR=/usr/lib
 fi
 
 fi
-if test x$PPM_LIBDIR = x; then
-        as_ac_File=`echo "ac_cv_file_/usr/lib/$PPM_LIBNAME" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for /usr/lib/$PPM_LIBNAME" >&5
-echo $ECHO_N "checking for /usr/lib/$PPM_LIBNAME... $ECHO_C" >&6; }
+if test x$PNG_LIBDIR = x; then
+        as_ac_File=`echo "ac_cv_file_/lib/$PNG_LIBNAME" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for /lib/$PNG_LIBNAME" >&5
+echo $ECHO_N "checking for /lib/$PNG_LIBNAME... $ECHO_C" >&6; }
 if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -8206,7 +8419,7 @@ else
   { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
 echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
    { (exit 1); exit 1; }; }
-if test -r "/usr/lib/$PPM_LIBNAME"; then
+if test -r "/lib/$PNG_LIBNAME"; then
   eval "$as_ac_File=yes"
 else
   eval "$as_ac_File=no"
@@ -8216,14 +8429,14 @@ ac_res=`eval echo '${'$as_ac_File'}'`
 	       { echo "$as_me:$LINENO: result: $ac_res" >&5
 echo "${ECHO_T}$ac_res" >&6; }
 if test `eval echo '${'$as_ac_File'}'` = yes; then
-  PPM_LIBDIR=/usr/lib
+  PNG_LIBDIR=/lib
 fi
 
 fi
-if test x$PPM_LIBDIR = x; then
-        as_ac_File=`echo "ac_cv_file_/lib/$PPM_LIBNAME" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for /lib/$PPM_LIBNAME" >&5
-echo $ECHO_N "checking for /lib/$PPM_LIBNAME... $ECHO_C" >&6; }
+if test x$PNG_LIBDIR = x; then
+        as_ac_File=`echo "ac_cv_file_$HOME/lib/$PNG_LIBNAME" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $HOME/lib/$PNG_LIBNAME" >&5
+echo $ECHO_N "checking for $HOME/lib/$PNG_LIBNAME... $ECHO_C" >&6; }
 if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -8231,7 +8444,7 @@ else
   { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
 echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
    { (exit 1); exit 1; }; }
-if test -r "/lib/$PPM_LIBNAME"; then
+if test -r "$HOME/lib/$PNG_LIBNAME"; then
   eval "$as_ac_File=yes"
 else
   eval "$as_ac_File=no"
@@ -8241,14 +8454,14 @@ ac_res=`eval echo '${'$as_ac_File'}'`
 	       { echo "$as_me:$LINENO: result: $ac_res" >&5
 echo "${ECHO_T}$ac_res" >&6; }
 if test `eval echo '${'$as_ac_File'}'` = yes; then
-  PPM_LIBDIR=/lib
+  PNG_LIBDIR=$HOME/lib
 fi
 
 fi
-if test x$PPM_LIBDIR = x; then
-        as_ac_File=`echo "ac_cv_file_$HOME/lib/$PPM_LIBNAME" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $HOME/lib/$PPM_LIBNAME" >&5
-echo $ECHO_N "checking for $HOME/lib/$PPM_LIBNAME... $ECHO_C" >&6; }
+if test x$PNG_LIBDIR = x; then
+        as_ac_File=`echo "ac_cv_file_/sw/lib/$PNG_LIBNAME" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for /sw/lib/$PNG_LIBNAME" >&5
+echo $ECHO_N "checking for /sw/lib/$PNG_LIBNAME... $ECHO_C" >&6; }
 if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -8256,7 +8469,7 @@ else
   { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
 echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
    { (exit 1); exit 1; }; }
-if test -r "$HOME/lib/$PPM_LIBNAME"; then
+if test -r "/sw/lib/$PNG_LIBNAME"; then
   eval "$as_ac_File=yes"
 else
   eval "$as_ac_File=no"
@@ -8266,42 +8479,54 @@ ac_res=`eval echo '${'$as_ac_File'}'`
 	       { echo "$as_me:$LINENO: result: $ac_res" >&5
 echo "${ECHO_T}$ac_res" >&6; }
 if test `eval echo '${'$as_ac_File'}'` = yes; then
-  PPM_LIBDIR=$HOME/lib
+  PNG_LIBDIR=/sw/lib
 fi
 
 fi
+PNG_LIBNAME=`echo $PNG_LIBNAME | sed s/lib// | sed s/\.so//`
+PNG_PRESENT=no
+if test $PNG_INC_PRESENT = yes; then
+	if test x$PNG_LIBDIR != x; then
+		PNG_PRESENT=yes
+		PNG_LIBS=-l$PNG_LIBNAME
+		PNG_LDFLAGS="-L$PNG_LIBDIR $PNG_LIBS"
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_PNG 1
+_ACEOF
+
+	fi
 fi
-PPM_LIBNAME=`echo $PPM_LIBNAME | sed s/lib// | sed s/\.so//`
 
 
 
 
-do_ppm=false
-if test x$PPM_INCDIR != x; then
-	if test x$PPM_LIBDIR != x; then
-		do_ppm=true
+do_png=false
+if test x$PNG_INCDIR != x; then
+	if test x$PNG_LIBDIR != x; then
+		do_png=true
 	fi
 fi
-if test $do_ppm = true; then
-	DO_PPM_LINE="INC_PPM   = -DINC_PPM"
-	DO_PPM_INCDIR="PPMINCDIR = -I$PPM_INCDIR"
-	DO_PPM_LIBDIR="PPMLIBDIR = -L$PPM_LIBDIR"
-	DO_PPM_LIBNAME="PPMLIB = -l$PPM_LIBNAME"
+if test $do_png = true; then
+	DO_PNG_LINE="INC_PNG   = -DINC_PNG"
+	DO_PNG_INCDIR="PNGINCDIR = -I$PNG_INCDIR"
+	DO_PNG_LIBDIR="PNGLIBDIR = -L$PNG_LIBDIR"
+	DO_PNG_LIBNAME="PNGLIB = -l$PNG_LIBNAME"
 else
 	echo "************************************************************************"
 	echo "Note: the -frames option is NOT enabled, because I could not find the "
-	echo "location of the PPM include file 'ppm.h' or library file"
-	echo "'libppm.a'.  Ncview uses the ppm package to dump out the frames viewed,"
+	echo "location of the PNG include file 'png.h' or library file"
+	echo "'libpng.so'.  Ncview uses the png package to dump out the frames viewed,"
 	echo "which is an easy way to make an mpeg video of the data if you want."
 	echo "If you do not want this feature, then don't worry about the lack"
-	echo "of ppm support.  If you DO want this, then you must tell me where to find"
-	echo "the ppm package by giving arguments to configure, as follows:"
-	echo "  ./configure -with-ppm_incdir=include_directory -with-ppm_libdir=library_directory"
+	echo "of png support.  If you DO want this, then you must install libpng, or tell "
+	echo "me where to find the png package by giving arguments to configure, as follows:"
+	echo "  ./configure -with-png_incdir=include_directory -with-png_libdir=library_directory"
 	echo "************************************************************************"
-	DO_PPM_LINE="#INC_PPM   = -DINC_PPM"
-	DO_PPM_INCDIR="#PPMINCDIR = -I$PPM_INCDIR"
-	DO_PPM_LIBDIR="#PPMLIBDIR = -I$PPM_LIBDIR"
-	DO_PPM_LIBNAME="#PPMLIB = -l$PPM_LIBNAME"
+	DO_PNG_LINE="#INC_PNG   = -DINC_PNG"
+	DO_PNG_INCDIR="#PNGINCDIR = -I$PNG_INCDIR"
+	DO_PNG_LIBDIR="#PNGLIBDIR = -I$PNG_LIBDIR"
+	DO_PNG_LIBNAME="#PNGLIB = -l$PNG_LIBNAME"
 fi
 
 
@@ -8404,10 +8629,19 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 # if it generally works or not.  Probably not.
 #----------------------------------------------------------------------------
 CC_TEST_SAME=$CC
-NETCDF_CC_TEST_SAME=$NETCDF_CC
+#-----------------------------------------------------------------------
+# Point of following obscure manipulations is that $CC can have multiple
+# words, for example, it could be "gcc -fPIC -lm". We want to keep only
+# the first word, so use 'set' and then take the first arg ($1).
+#-----------------------------------------------------------------------
+set $CC_TEST_SAME
+CC_TEST_SAME=$1
 if test x$CC_TEST_SAME = xcc; then
 	CC_TEST_SAME=gcc
 fi
+NETCDF_CC_TEST_SAME=$NETCDF_CC
+set $NETCDF_CC_TEST_SAME
+NETCDF_CC_TEST_SAME=$1
 if test x$NETCDF_CC_TEST_SAME = xcc; then
 	NETCDF_CC_TEST_SAME=gcc
 fi
@@ -8444,7 +8678,7 @@ fi
 #	LIBS="-L/usr/local/lib -lnetcdf -L/home/pierce/lib -ludunits"
 # We want to convert this to -rpath flags suitable for the compiler, which would
 # have this format:
-#	"-Wl,R,/usr/local/lib -Wl,R,/home/pierce/lib"
+#	"-Wl,-rpath,/usr/local/lib -Wl,-rpath,/home/pierce/lib"
 #
 # As a safety check, I only do this for the GNU compiler, as I don't know if this
 # is anything like correct syntax for other compilers.  Note that this *does* work
@@ -8454,9 +8688,9 @@ fi
 if test x$ac_compiler_gnu = xyes; then
 	RPATH_FLAGS=""
 	for word in $UDUNITS2_LDFLAGS $NETCDF_LDFLAGS; do
-		if test `expr match $word -L/` -eq 3; then
+		if test `expr $word : -L/` -eq 3; then
 			RPDIR=`expr substr $word 3 999`;
-			RPATH_FLAGS="$RPATH_FLAGS -Wl,-R,$RPDIR"
+			RPATH_FLAGS="$RPATH_FLAGS -Wl,-rpath,$RPDIR"
 		fi
 	done
 
@@ -9247,13 +9481,13 @@ ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
 DO_UDUNITS2_LIBNAME!$DO_UDUNITS2_LIBNAME$ac_delim
-PPM_INCDIR!$PPM_INCDIR$ac_delim
-PPM_LIBDIR!$PPM_LIBDIR$ac_delim
-PPM_LIBNAME!$PPM_LIBNAME$ac_delim
-DO_PPM_LINE!$DO_PPM_LINE$ac_delim
-DO_PPM_INCDIR!$DO_PPM_INCDIR$ac_delim
-DO_PPM_LIBDIR!$DO_PPM_LIBDIR$ac_delim
-DO_PPM_LIBNAME!$DO_PPM_LIBNAME$ac_delim
+PNG_CPPFLAGS!$PNG_CPPFLAGS$ac_delim
+PNG_LDFLAGS!$PNG_LDFLAGS$ac_delim
+PNG_LIBS!$PNG_LIBS$ac_delim
+DO_PNG_LINE!$DO_PNG_LINE$ac_delim
+DO_PNG_INCDIR!$DO_PNG_INCDIR$ac_delim
+DO_PNG_LIBDIR!$DO_PNG_LIBDIR$ac_delim
+DO_PNG_LIBNAME!$DO_PNG_LIBNAME$ac_delim
 PREFIX!$PREFIX$ac_delim
 X_INCLUDES!$X_INCLUDES$ac_delim
 RPATH_FLAGS!$RPATH_FLAGS$ac_delim
@@ -9865,16 +10099,17 @@ fi
 echo " "
 echo "----------- Configure Summary ----------"
 echo "Compiler:"
-echo "        CC                = $CC"
+echo "        CC                 = $CC"
+echo "        Runtime path flags = $RPATH_FLAGS"
 echo " "
-if test x"$with_udunits"x == "xnox"; then
-	echo "UDUNITS: not found"
-else
 echo "UDUNITS:"
+if test $do_udunits2 = true; then
 echo "        UDUNITS2_LIBS     = $UDUNITS2_LIBS"
 echo "        UDUNITS2_CPPFLAGS = $UDUNITS2_CPPFLAGS"
 echo "        UDUNITS2_LDFLAGS  = $UDUNITS2_LDFLAGS"
 echo " "
+else
+echo "        not found. Specify --with-udunits2_incdir=... and --with-udunits2_libdir=... flags to enable"
 fi
 
 echo " "
@@ -9892,4 +10127,14 @@ echo "        XAW_LIBS         = $XAW_LIBS"
 echo "        X_PRE_LIBS       = $X_PRE_LIBS"
 echo "        X_LIBS           = $X_LIBS"
 echo "        X_EXTRA_LIBS     = $X_EXTRA_LIBS"
+echo " "
+echo "PNG:"
+if test $do_png = true; then
+echo "        PNG_LIBS         = $PNG_LIBS"
+echo "        PNG_CPPFLAGS     = $PNG_CPPFLAGS"
+echo "        PNG_LDFLAGS      = $PNG_LDFLAGS"
+echo " "
+else
+echo "        not found. Install libpng, or specify --with-png_incdir=... and --with-png_libdir=... flags to enable"
+fi
 
diff --git a/configure.in b/configure.in
index 8c25ffa..6cf9a25 100644
--- a/configure.in
+++ b/configure.in
@@ -82,17 +82,25 @@ AC_CHECK_LIB(Xt,XtWindow,[],[haveAthena=no])
 AC_CHECK_LIB(Xaw, XawScrollbarSetThumb,[],[haveAthena=no])
 if test x"$haveAthena"x = "xnox"; then
 	haveAthena=yes
+	AC_MSG_CHECKING([for the Athena 3d widgets instead])
 	AC_CHECK_LIB(Xaw3d, XawScrollbarSetThumb,[],[haveAthena=no])
 fi
 AC_CHECK_HEADER([X11/Intrinsic.h],[],[haveAthena=no])
 AC_CHECK_HEADER([X11/Xaw/Simple.h],[],[haveAthena=no])
 if test x"$haveAthena"x != "xyesx"; then
-  AC_MSG_ERROR([Could not find Athena widgets library and header.  Use your package manager to install the X windows development libraries and headers.])
+  # On AIX this fails because the Xmu header needs to be there as well...
+  AC_CHECK_HEADER([X11/Xaw/Simple.h],[],[haveAthena=no],[[
+#include<X11/Xmu/Xmu.h>
+]])
+  if test x"$haveAthena"x != "xyesx"; then
+    AC_MSG_ERROR([Could not find Athena widgets library and header (checked w/Xmu.h included as well).  Use your package manager to install the X windows development libraries and headers.])
+  fi
 fi
 XAW_LIBS=$LIBS
 echo "X Athena widget (Xaw) libraries: $XAW_LIBS"
 AC_SUBST(XAW_LIBS)
 LIBS=$LIBSsave
+CFLAGS=$CFLAGSsave
 
 #------------------------------------------------------------------------------
 # Check for X11 library. It's not clear to me why this is necessary, yet Darwin 
@@ -113,6 +121,7 @@ X11_LIBS=$LIBS
 echo "X11 libraries: $X11_LIBS"
 AC_SUBST(X11_LIBS)
 LIBS=$LIBSsave
+CFLAGS=$CFLAGSsave
 
 # Handle udunits2
 AC_PATH_UDUNITS2
@@ -153,39 +162,39 @@ AC_SUBST(DO_UDUNITS2_INCDIR)
 AC_SUBST(DO_UDUNITS2_LIBDIR)
 AC_SUBST(DO_UDUNITS2_LIBNAME)
 
-# Handle ppm
-AC_PATH_PPM
-do_ppm=false
-if test x$PPM_INCDIR != x; then
-	if test x$PPM_LIBDIR != x; then
-		do_ppm=true
+# Handle png
+AC_PATH_PNG
+do_png=false
+if test x$PNG_INCDIR != x; then
+	if test x$PNG_LIBDIR != x; then
+		do_png=true
 	fi
 fi
-if test $do_ppm = true; then
-	DO_PPM_LINE="INC_PPM   = -DINC_PPM"
-	DO_PPM_INCDIR="PPMINCDIR = -I$PPM_INCDIR"
-	DO_PPM_LIBDIR="PPMLIBDIR = -L$PPM_LIBDIR"
-	DO_PPM_LIBNAME="PPMLIB = -l$PPM_LIBNAME"
+if test $do_png = true; then
+	DO_PNG_LINE="INC_PNG   = -DINC_PNG"
+	DO_PNG_INCDIR="PNGINCDIR = -I$PNG_INCDIR"
+	DO_PNG_LIBDIR="PNGLIBDIR = -L$PNG_LIBDIR"
+	DO_PNG_LIBNAME="PNGLIB = -l$PNG_LIBNAME"
 else
 	echo "************************************************************************"
 	echo "Note: the -frames option is NOT enabled, because I could not find the "
-	echo "location of the PPM include file 'ppm.h' or library file"
-	echo "'libppm.a'.  Ncview uses the ppm package to dump out the frames viewed,"
+	echo "location of the PNG include file 'png.h' or library file"
+	echo "'libpng.so'.  Ncview uses the png package to dump out the frames viewed,"
 	echo "which is an easy way to make an mpeg video of the data if you want."
 	echo "If you do not want this feature, then don't worry about the lack"
-	echo "of ppm support.  If you DO want this, then you must tell me where to find"
-	echo "the ppm package by giving arguments to configure, as follows:"
-	echo "  ./configure -with-ppm_incdir=include_directory -with-ppm_libdir=library_directory"
+	echo "of png support.  If you DO want this, then you must install libpng, or tell "
+	echo "me where to find the png package by giving arguments to configure, as follows:"
+	echo "  ./configure -with-png_incdir=include_directory -with-png_libdir=library_directory"
 	echo "************************************************************************"
-	DO_PPM_LINE="#INC_PPM   = -DINC_PPM"
-	DO_PPM_INCDIR="#PPMINCDIR = -I$PPM_INCDIR"
-	DO_PPM_LIBDIR="#PPMLIBDIR = -I$PPM_LIBDIR"
-	DO_PPM_LIBNAME="#PPMLIB = -l$PPM_LIBNAME"
+	DO_PNG_LINE="#INC_PNG   = -DINC_PNG"
+	DO_PNG_INCDIR="#PNGINCDIR = -I$PNG_INCDIR"
+	DO_PNG_LIBDIR="#PNGLIBDIR = -I$PNG_LIBDIR"
+	DO_PNG_LIBNAME="#PNGLIB = -l$PNG_LIBNAME"
 fi
-AC_SUBST(DO_PPM_LINE)
-AC_SUBST(DO_PPM_INCDIR)
-AC_SUBST(DO_PPM_LIBDIR)
-AC_SUBST(DO_PPM_LIBNAME)
+AC_SUBST(DO_PNG_LINE)
+AC_SUBST(DO_PNG_INCDIR)
+AC_SUBST(DO_PNG_LIBDIR)
+AC_SUBST(DO_PNG_LIBNAME)
 PREFIX=${prefix}
 
 AC_PROG_INSTALL
@@ -204,10 +213,19 @@ AC_SUBST(X_INCLUDES)
 # if it generally works or not.  Probably not.
 #----------------------------------------------------------------------------
 CC_TEST_SAME=$CC
-NETCDF_CC_TEST_SAME=$NETCDF_CC
+#-----------------------------------------------------------------------
+# Point of following obscure manipulations is that $CC can have multiple
+# words, for example, it could be "gcc -fPIC -lm". We want to keep only
+# the first word, so use 'set' and then take the first arg ($1).
+#-----------------------------------------------------------------------
+set $CC_TEST_SAME
+CC_TEST_SAME=$1
 if test x$CC_TEST_SAME = xcc; then
 	CC_TEST_SAME=gcc			
 fi
+NETCDF_CC_TEST_SAME=$NETCDF_CC
+set $NETCDF_CC_TEST_SAME
+NETCDF_CC_TEST_SAME=$1
 if test x$NETCDF_CC_TEST_SAME = xcc; then
 	NETCDF_CC_TEST_SAME=gcc
 fi
@@ -244,7 +262,7 @@ fi
 #	LIBS="-L/usr/local/lib -lnetcdf -L/home/pierce/lib -ludunits"
 # We want to convert this to -rpath flags suitable for the compiler, which would
 # have this format:
-#	"-Wl,R,/usr/local/lib -Wl,R,/home/pierce/lib"
+#	"-Wl,-rpath,/usr/local/lib -Wl,-rpath,/home/pierce/lib"
 #
 # As a safety check, I only do this for the GNU compiler, as I don't know if this
 # is anything like correct syntax for other compilers.  Note that this *does* work
@@ -254,9 +272,9 @@ fi
 if test x$ac_compiler_gnu = xyes; then
 	RPATH_FLAGS=""
 	for word in $UDUNITS2_LDFLAGS $NETCDF_LDFLAGS; do
-		if test `expr match $word -L/` -eq 3; then
+		if test `expr $word : -L/` -eq 3; then
 			RPDIR=`expr substr $word 3 999`;
-			RPATH_FLAGS="$RPATH_FLAGS -Wl,-R,$RPDIR"
+			RPATH_FLAGS="$RPATH_FLAGS -Wl,-rpath,$RPDIR"
 		fi
 	done
 	AC_SUBST(RPATH_FLAGS)
@@ -270,16 +288,17 @@ AC_OUTPUT
 echo " "
 echo "----------- Configure Summary ----------"
 echo "Compiler:"
-echo "        CC                = $CC"
+echo "        CC                 = $CC"
+echo "        Runtime path flags = $RPATH_FLAGS"
 echo " "
-if test x"$with_udunits"x == "xnox"; then
-	echo "UDUNITS: not found"
-else
 echo "UDUNITS:"
+if test $do_udunits2 = true; then
 echo "        UDUNITS2_LIBS     = $UDUNITS2_LIBS"
 echo "        UDUNITS2_CPPFLAGS = $UDUNITS2_CPPFLAGS"
 echo "        UDUNITS2_LDFLAGS  = $UDUNITS2_LDFLAGS"
 echo " "
+else
+echo "        not found. Specify --with-udunits2_incdir=... and --with-udunits2_libdir=... flags to enable"
 fi
 
 echo " "
@@ -297,4 +316,14 @@ echo "        XAW_LIBS         = $XAW_LIBS"
 echo "        X_PRE_LIBS       = $X_PRE_LIBS"
 echo "        X_LIBS           = $X_LIBS"
 echo "        X_EXTRA_LIBS     = $X_EXTRA_LIBS"
+echo " "
+echo "PNG:"
+if test $do_png = true; then
+echo "        PNG_LIBS         = $PNG_LIBS"
+echo "        PNG_CPPFLAGS     = $PNG_CPPFLAGS"
+echo "        PNG_LDFLAGS      = $PNG_LDFLAGS"
+echo " "
+else
+echo "        not found. Install libpng, or specify --with-png_incdir=... and --with-png_libdir=... flags to enable"
+fi
 
diff --git a/m4macros/png.m4 b/m4macros/png.m4
new file mode 100644
index 0000000..28fe96a
--- /dev/null
+++ b/m4macros/png.m4
@@ -0,0 +1,119 @@
+dnl
+dnl AC_PATH_PNG()
+dnl
+dnl Defines PNG_INCDIR and PNG_LIBDIR if they exist, and leaves them undefined
+dnl otherwise.
+dnl
+dnl 13 July 2011
+dnl David W. Pierce
+dnl Climate Research Division
+dnl Scripps Institution of Oceanography
+dnl dpierce at ucsd.edu
+dnl
+dnl *******************************************************************************
+dnl This code is in the public domain, and can be used for any purposes whatsoever. 
+dnl *******************************************************************************
+dnl 
+dnl
+AC_DEFUN([AC_PATH_PNG],[
+AC_ARG_WITH( png_incdir, [  --with-png_incdir=dir directory containing png includes],  PNG_INCDIR=$withval)
+dnl
+dnl
+dnl =================================================================================
+dnl check for png include directory
+dnl
+err=0
+if test x$PNG_INCDIR != x; then
+        AC_CHECK_HEADER( $PNG_INCDIR/png.h,
+          echo "Using user-specified png include dir=$PNG_INCDIR",
+          err=1 )
+	if test $err -eq 1; then
+		echo "--------------------------------------------------------------------------------"
+		echo "Error: You specified that the pnginclude directory is $PNG_INCDIR"
+		echo "but that directory does NOT have required png include file png.h."
+		echo "You must specify a directory that has the png include files"
+		echo "--------------------------------------------------------------------------------"
+		exit -1
+	fi
+fi
+if test $err -eq 1; then
+        echo "Error: user specified png include directory does not have png.h!"
+        exit -1
+fi
+if test x$PNG_INCDIR = x; then
+        AC_CHECK_HEADER( png.h, PNG_INCDIR=. )
+fi
+if test x$PNG_INCDIR = x; then
+        AC_CHECK_HEADER( /usr/local/include/png.h, PNG_INCDIR=/usr/local/include )
+fi
+if test x$PNG_INCDIR = x; then
+        AC_CHECK_HEADER( /usr/include/png.h, PNG_INCDIR=/usr/include )
+fi
+if test x$PNG_INCDIR = x; then
+        AC_CHECK_HEADER( $HOME/include/png.h, PNG_INCDIR=$HOME/include )
+fi
+if test x$PNG_INCDIR = x; then
+        AC_CHECK_HEADER( /sw/include/png.h, PNG_INCDIR=/sw/include )
+fi
+dnl
+PNG_INC_PRESENT=no
+if test x$PNG_INCDIR != x; then
+	PNG_INC_PRESENT=yes
+        PNG_CPPFLAGS=-I$PNG_INCDIR
+else
+	echo "** Could not find the png.h file, so -frames support will not be included  **"
+	echo "** Install the PNG library (and development headers) to fix this           **"
+fi
+dnl =================================================================================
+dnl check for png lib directory
+dnl
+PNG_LIBNAME=libpng.so
+dnl
+AC_ARG_WITH( png_libdir, [  --with-png_libdir=dir directory containing png library],  PNG_LIBDIR=$withval)
+err=0
+if test x$PNG_LIBDIR != x; then
+        AC_CHECK_FILE( $PNG_LIBDIR/$PNG_LIBNAME,
+          echo "Using user-specified png library dir=$PNG_LIBDIR",
+          err=1 )
+fi
+if test $err -eq 1; then
+        echo "Error: user specified png library directory does not have $PNG_LIBNAME !"
+        exit -1
+fi
+if test x$PNG_LIBDIR = x; then
+        AC_CHECK_LIB( png, png_write_png, PNG_LIBDIR=. )
+fi
+if test x$PNG_LIBDIR = x; then
+        AC_CHECK_FILE( /usr/local/lib/$PNG_LIBNAME, PNG_LIBDIR=/usr/local/lib )
+fi
+if test x$PNG_LIBDIR = x; then
+        AC_CHECK_FILE( /usr/lib/$PNG_LIBNAME, PNG_LIBDIR=/usr/lib )
+fi
+if test x$PNG_LIBDIR = x; then
+        AC_CHECK_FILE( /lib/$PNG_LIBNAME, PNG_LIBDIR=/lib )
+fi
+if test x$PNG_LIBDIR = x; then
+        AC_CHECK_FILE( $HOME/lib/$PNG_LIBNAME, PNG_LIBDIR=$HOME/lib )
+fi
+if test x$PNG_LIBDIR = x; then
+        AC_CHECK_FILE( /sw/lib/$PNG_LIBNAME, PNG_LIBDIR=/sw/lib )
+fi
+PNG_LIBNAME=`echo $PNG_LIBNAME | sed s/lib// | sed s/\.so//`
+dnl
+PNG_PRESENT=no
+if test $PNG_INC_PRESENT = yes; then
+	if test x$PNG_LIBDIR != x; then
+		PNG_PRESENT=yes
+		PNG_LIBS=-l$PNG_LIBNAME
+		PNG_LDFLAGS="-L$PNG_LIBDIR $PNG_LIBS"
+		AC_DEFINE([HAVE_PNG],1,[Define if you have PNG library])
+	fi
+fi
+dnl
+dnl Export our variables
+dnl
+AC_SUBST(PNG_CPPFLAGS)
+AC_SUBST(PNG_LDFLAGS)
+AC_SUBST(PNG_LIBS)
+dnl
+])
diff --git a/m4macros/ppm.m4 b/m4macros/ppm.m4
deleted file mode 100644
index 3af1f1f..0000000
--- a/m4macros/ppm.m4
+++ /dev/null
@@ -1,109 +0,0 @@
-dnl
-dnl AC_PATH_PPM()
-dnl
-dnl Defines PPM_INCDIR and PPM_LIBDIR if they exist, and leaves them undefined
-dnl otherwise.
-dnl
-dnl version 0.1    
-dnl 3 May 2002
-dnl David W. Pierce
-dnl Climate Research Division
-dnl Scripps Institution of Oceanography
-dnl dpierce at ucsd.edu
-dnl
-dnl *******************************************************************************
-dnl This code is in the public domain, and can be used for any purposes whatsoever. 
-dnl *******************************************************************************
-dnl 
-dnl
-AC_DEFUN([AC_PATH_PPM],[
-AC_ARG_WITH( ppm_incdir, [  --with-ppm_incdir=dir directory containing ppm includes],  PPM_INCDIR=$withval)
-dnl
-dnl
-dnl =================================================================================
-dnl check for ppm include directory
-dnl
-err=0
-if test x$PPM_INCDIR != x; then
-        AC_CHECK_HEADER( $PPM_INCDIR/ppm.h,
-          echo "Using user-specified ppm include dir=$PPM_INCDIR",
-          err=1 )
-fi
-if test $err -eq 1; then
-        echo "Error: user specified ppm include directory does not have ppm.h!"
-        exit -1
-fi
-if test x$PPM_INCDIR = x; then
-        AC_CHECK_HEADER( /usr/local/include/ppm.h, PPM_INCDIR=/usr/local/include )
-fi
-if test x$PPM_INCDIR = x; then
-        AC_CHECK_HEADER( /usr/include/ppm.h, PPM_INCDIR=/usr/include )
-fi
-if test x$PPM_INCDIR = x; then
-        AC_CHECK_HEADER( $HOME/include/ppm.h, PPM_INCDIR=$HOME/include )
-fi
-dnl
-dnl =================================================================================
-dnl check for ppm lib directory
-dnl
-PPM_LIBNAME=libppm.so
-dnl
-AC_ARG_WITH( ppm_libdir, [  --with-ppm_libdir=dir directory containing ppm library],  PPM_LIBDIR=$withval)
-err=0
-if test x$PPM_LIBDIR != x; then
-        AC_CHECK_FILE( $PPM_LIBDIR/$PPM_LIBNAME,
-          echo "Using user-specified ppm library dir=$PPM_LIBDIR",
-          err=1 )
-fi
-if test $err -eq 1; then
-        echo "Error: user specified ppm library directory does not have $PPM_LIBNAME !"
-        exit -1
-fi
-if test x$PPM_LIBDIR = x; then
-	AC_CHECK_LIB( ppm, ppm_writeppm, PPM_LIBDIR=. )
-fi
-if test x$PPM_LIBDIR = x; then
-        AC_CHECK_FILE( /usr/local/lib/$PPM_LIBNAME, PPM_LIBDIR=/usr/local/lib )
-fi
-if test x$PPM_LIBDIR = x; then
-        AC_CHECK_FILE( /usr/lib/$PPM_LIBNAME, PPM_LIBDIR=/usr/lib )
-fi
-if test x$PPM_LIBDIR = x; then
-        AC_CHECK_FILE( /lib/$PPM_LIBNAME, PPM_LIBDIR=/lib )
-fi
-if test x$PPM_LIBDIR = x; then
-        AC_CHECK_FILE( $HOME/lib/$PPM_LIBNAME, PPM_LIBDIR=$HOME/lib )
-fi
-dnl
-dnl =================================================================================
-dnl If ppm library not found, try netpbm
-dnl
-if test x$PPM_LIBDIR = x; then
-PPM_LIBNAME=libnetpbm.so
-if test x$PPM_LIBDIR = x; then
-	AC_CHECK_LIB( netpbm, ppm_writeppm, PPM_LIBDIR=. )
-fi
-if test x$PPM_LIBDIR = x; then
-        AC_CHECK_FILE( /usr/local/lib/$PPM_LIBNAME, PPM_LIBDIR=/usr/local/lib )
-fi
-if test x$PPM_LIBDIR = x; then
-        AC_CHECK_FILE( /usr/lib/$PPM_LIBNAME, PPM_LIBDIR=/usr/lib )
-fi
-if test x$PPM_LIBDIR = x; then
-        AC_CHECK_FILE( /lib/$PPM_LIBNAME, PPM_LIBDIR=/lib )
-fi
-if test x$PPM_LIBDIR = x; then
-        AC_CHECK_FILE( $HOME/lib/$PPM_LIBNAME, PPM_LIBDIR=$HOME/lib )
-fi
-fi
-dnl
-dnl
-PPM_LIBNAME=`echo $PPM_LIBNAME | sed s/lib// | sed s/\.so//`
-dnl
-dnl Export our variables
-dnl
-AC_SUBST(PPM_INCDIR)
-AC_SUBST(PPM_LIBDIR)
-AC_SUBST(PPM_LIBNAME)
-dnl
-])
diff --git a/m4macros/udunits2.m4 b/m4macros/udunits2.m4
index 7d91578..34f1230 100644
--- a/m4macros/udunits2.m4
+++ b/m4macros/udunits2.m4
@@ -61,8 +61,12 @@ if test x$UDUNITS2_INCDIR = x; then
         AC_CHECK_HEADER( /sw/include/udunits2.h, UDUNITS2_INCDIR=/sw/include )
 fi
 dnl
+UDUNITS2_INC_PRESENT=no
 if test x$UDUNITS2_INCDIR != x; then
+	UDUNITS2_INC_PRESENT=yes
         UDUNITS2_CPPFLAGS=-I$UDUNITS2_INCDIR
+else
+	echo "** Could not find the udunits2.h file, udunits support will not be included **"
 fi
 dnl =================================================================================
 dnl check for udunits2 lib directory
@@ -101,11 +105,13 @@ fi
 UDUNITS2_LIBNAME=`echo $UDUNITS2_LIBNAME | sed s/lib// | sed s/\.a//`
 dnl
 UDUNITS2_PRESENT=no
-if test x$UDUNITS2_LIBDIR != x; then
-	UDUNITS2_PRESENT=yes
-	UDUNITS2_LIBS=-l$UDUNITS2_LIBNAME
-        UDUNITS2_LDFLAGS="-L$UDUNITS2_LIBDIR $UDUNITS2_LIBS"
-	AC_DEFINE([HAVE_UDUNITS2],1,[Define if you have udunits-2 library])
+if test $UDUNITS2_INC_PRESENT = yes; then
+	if test x$UDUNITS2_LIBDIR != x; then
+		UDUNITS2_PRESENT=yes
+		UDUNITS2_LIBS=-l$UDUNITS2_LIBNAME
+		UDUNITS2_LDFLAGS="-L$UDUNITS2_LIBDIR $UDUNITS2_LIBS"
+		AC_DEFINE([HAVE_UDUNITS2],1,[Define if you have udunits-2 library])
+	fi
 fi
 dnl
 dnl ------------------------------------------------------------------------
@@ -128,6 +134,7 @@ if test $UDUNITS2_PRESENT = yes; then
 	echo "Expat libraries (needed by udunits2): $EXPAT_LIBS"
 	UDUNITS2_LDFLAGS="$UDUNITS2_LDFLAGS $LIBS"
 	LIBS=$LIBSsave
+	CFLAGS=$CFLAGSsave
 fi
 
 dnl Export our variables
diff --git a/src/.deps/RadioWidget.Po b/src/.deps/RadioWidget.Po
deleted file mode 100644
index 7f6c38c..0000000
--- a/src/.deps/RadioWidget.Po
+++ /dev/null
@@ -1,291 +0,0 @@
-RadioWidget.o RadioWidget.o: interface/RadioWidget.c \
-  interface/../ncview.includes.h /usr/include/stdio.h \
-  /usr/include/features.h /usr/include/sys/cdefs.h \
-  /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
-  /usr/include/gnu/stubs-64.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h \
-  /usr/include/bits/types.h /usr/include/bits/typesizes.h \
-  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h \
-  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
-  /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
-  /usr/include/endian.h /usr/include/bits/endian.h \
-  /usr/include/sys/select.h /usr/include/bits/select.h \
-  /usr/include/bits/sigset.h /usr/include/bits/time.h \
-  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
-  /usr/include/alloca.h /usr/include/dirent.h /usr/include/bits/dirent.h \
-  /usr/include/bits/posix1_lim.h /usr/include/bits/local_lim.h \
-  /usr/include/linux/limits.h /usr/include/sys/stat.h \
-  /usr/include/bits/stat.h /usr/include/fcntl.h /usr/include/bits/fcntl.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/limits.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/syslimits.h \
-  /usr/include/limits.h /usr/include/bits/posix2_lim.h \
-  /usr/include/math.h /usr/include/bits/huge_val.h \
-  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
-  /usr/include/unistd.h /usr/include/bits/posix_opt.h \
-  /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/ctype.h \
-  /usr/include/X11/Intrinsic.h /usr/include/X11/Xlib.h \
-  /usr/include/X11/X.h /usr/include/X11/Xfuncproto.h \
-  /usr/include/X11/Xosdefs.h /usr/include/X11/Xutil.h \
-  /usr/include/X11/keysym.h /usr/include/X11/keysymdef.h \
-  /usr/include/X11/Xresource.h /usr/include/string.h \
-  /usr/include/X11/Core.h /usr/include/X11/Composite.h \
-  /usr/include/X11/Constraint.h /usr/include/X11/Object.h \
-  /usr/include/X11/RectObj.h /usr/include/X11/IntrinsicP.h \
-  /usr/include/X11/CoreP.h /usr/include/X11/CompositeP.h \
-  /usr/include/X11/ConstrainP.h /usr/include/X11/ObjectP.h \
-  /usr/include/X11/RectObjP.h /usr/include/X11/StringDefs.h \
-  /usr/include/X11/cursorfont.h /usr/include/X11/Shell.h \
-  /usr/include/X11/SM/SMlib.h /usr/include/X11/SM/SM.h \
-  /usr/include/X11/ICE/ICElib.h /usr/include/X11/ICE/ICE.h \
-  /usr/include/X11/Xaw/Form.h /usr/include/X11/Xaw/Box.h \
-  /usr/include/X11/Xmu/Converters.h /usr/include/X11/Xaw/Command.h \
-  /usr/include/X11/Xaw/Label.h /usr/include/X11/Xaw/Simple.h \
-  /usr/include/X11/Xaw/Toggle.h /usr/include/X11/Xaw/Dialog.h \
-  /usr/include/X11/Xaw/Scrollbar.h /usr/include/X11/Xaw/Viewport.h \
-  /usr/include/X11/Xaw/Reports.h /usr/include/X11/Xaw/List.h \
-  /usr/include/X11/Xaw/AsciiText.h /usr/include/X11/Xaw/Text.h \
-  /usr/include/X11/Xaw/TextSink.h /usr/include/X11/Xaw/TextSrc.h \
-  /usr/include/X11/Xaw/AsciiSrc.h /usr/include/X11/Xaw/AsciiSink.h \
-  /usr/include/X11/Xaw/MultiSrc.h /usr/include/X11/Xaw/MenuButton.h \
-  /usr/include/X11/Xaw/SimpleMenu.h /usr/include/X11/Xaw/SmeBSB.h \
-  /usr/include/X11/Xaw/Sme.h /usr/include/X11/Xaw/SmeLine.h \
-  interface/../SciPlot.h /home/pierce/include/netcdf.h \
-  /usr/include/errno.h /usr/include/bits/errno.h \
-  /usr/include/linux/errno.h /usr/include/asm/errno.h \
-  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
-  interface/../../config.h interface/../ncview.defines.h \
-  /home/pierce/include/udunits2.h /home/pierce/include/converter.h \
-  interface/../ncview.protos.h interface/RadioWidget.h
-
-interface/../ncview.includes.h:
-
-/usr/include/stdio.h:
-
-/usr/include/features.h:
-
-/usr/include/sys/cdefs.h:
-
-/usr/include/bits/wordsize.h:
-
-/usr/include/gnu/stubs.h:
-
-/usr/include/gnu/stubs-64.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h:
-
-/usr/include/bits/types.h:
-
-/usr/include/bits/typesizes.h:
-
-/usr/include/libio.h:
-
-/usr/include/_G_config.h:
-
-/usr/include/wchar.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h:
-
-/usr/include/bits/stdio_lim.h:
-
-/usr/include/bits/sys_errlist.h:
-
-/usr/include/stdlib.h:
-
-/usr/include/sys/types.h:
-
-/usr/include/time.h:
-
-/usr/include/endian.h:
-
-/usr/include/bits/endian.h:
-
-/usr/include/sys/select.h:
-
-/usr/include/bits/select.h:
-
-/usr/include/bits/sigset.h:
-
-/usr/include/bits/time.h:
-
-/usr/include/sys/sysmacros.h:
-
-/usr/include/bits/pthreadtypes.h:
-
-/usr/include/alloca.h:
-
-/usr/include/dirent.h:
-
-/usr/include/bits/dirent.h:
-
-/usr/include/bits/posix1_lim.h:
-
-/usr/include/bits/local_lim.h:
-
-/usr/include/linux/limits.h:
-
-/usr/include/sys/stat.h:
-
-/usr/include/bits/stat.h:
-
-/usr/include/fcntl.h:
-
-/usr/include/bits/fcntl.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/limits.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/syslimits.h:
-
-/usr/include/limits.h:
-
-/usr/include/bits/posix2_lim.h:
-
-/usr/include/math.h:
-
-/usr/include/bits/huge_val.h:
-
-/usr/include/bits/mathdef.h:
-
-/usr/include/bits/mathcalls.h:
-
-/usr/include/unistd.h:
-
-/usr/include/bits/posix_opt.h:
-
-/usr/include/bits/confname.h:
-
-/usr/include/getopt.h:
-
-/usr/include/ctype.h:
-
-/usr/include/X11/Intrinsic.h:
-
-/usr/include/X11/Xlib.h:
-
-/usr/include/X11/X.h:
-
-/usr/include/X11/Xfuncproto.h:
-
-/usr/include/X11/Xosdefs.h:
-
-/usr/include/X11/Xutil.h:
-
-/usr/include/X11/keysym.h:
-
-/usr/include/X11/keysymdef.h:
-
-/usr/include/X11/Xresource.h:
-
-/usr/include/string.h:
-
-/usr/include/X11/Core.h:
-
-/usr/include/X11/Composite.h:
-
-/usr/include/X11/Constraint.h:
-
-/usr/include/X11/Object.h:
-
-/usr/include/X11/RectObj.h:
-
-/usr/include/X11/IntrinsicP.h:
-
-/usr/include/X11/CoreP.h:
-
-/usr/include/X11/CompositeP.h:
-
-/usr/include/X11/ConstrainP.h:
-
-/usr/include/X11/ObjectP.h:
-
-/usr/include/X11/RectObjP.h:
-
-/usr/include/X11/StringDefs.h:
-
-/usr/include/X11/cursorfont.h:
-
-/usr/include/X11/Shell.h:
-
-/usr/include/X11/SM/SMlib.h:
-
-/usr/include/X11/SM/SM.h:
-
-/usr/include/X11/ICE/ICElib.h:
-
-/usr/include/X11/ICE/ICE.h:
-
-/usr/include/X11/Xaw/Form.h:
-
-/usr/include/X11/Xaw/Box.h:
-
-/usr/include/X11/Xmu/Converters.h:
-
-/usr/include/X11/Xaw/Command.h:
-
-/usr/include/X11/Xaw/Label.h:
-
-/usr/include/X11/Xaw/Simple.h:
-
-/usr/include/X11/Xaw/Toggle.h:
-
-/usr/include/X11/Xaw/Dialog.h:
-
-/usr/include/X11/Xaw/Scrollbar.h:
-
-/usr/include/X11/Xaw/Viewport.h:
-
-/usr/include/X11/Xaw/Reports.h:
-
-/usr/include/X11/Xaw/List.h:
-
-/usr/include/X11/Xaw/AsciiText.h:
-
-/usr/include/X11/Xaw/Text.h:
-
-/usr/include/X11/Xaw/TextSink.h:
-
-/usr/include/X11/Xaw/TextSrc.h:
-
-/usr/include/X11/Xaw/AsciiSrc.h:
-
-/usr/include/X11/Xaw/AsciiSink.h:
-
-/usr/include/X11/Xaw/MultiSrc.h:
-
-/usr/include/X11/Xaw/MenuButton.h:
-
-/usr/include/X11/Xaw/SimpleMenu.h:
-
-/usr/include/X11/Xaw/SmeBSB.h:
-
-/usr/include/X11/Xaw/Sme.h:
-
-/usr/include/X11/Xaw/SmeLine.h:
-
-interface/../SciPlot.h:
-
-/home/pierce/include/netcdf.h:
-
-/usr/include/errno.h:
-
-/usr/include/bits/errno.h:
-
-/usr/include/linux/errno.h:
-
-/usr/include/asm/errno.h:
-
-/usr/include/asm-generic/errno.h:
-
-/usr/include/asm-generic/errno-base.h:
-
-interface/../../config.h:
-
-interface/../ncview.defines.h:
-
-/home/pierce/include/udunits2.h:
-
-/home/pierce/include/converter.h:
-
-interface/../ncview.protos.h:
-
-interface/RadioWidget.h:
diff --git a/src/.deps/SciPlot.Po b/src/.deps/SciPlot.Po
deleted file mode 100644
index 7dd9857..0000000
--- a/src/.deps/SciPlot.Po
+++ /dev/null
@@ -1,138 +0,0 @@
-SciPlot.o SciPlot.o: SciPlot.c /usr/include/math.h \
-  /usr/include/features.h /usr/include/sys/cdefs.h \
-  /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
-  /usr/include/gnu/stubs-64.h /usr/include/bits/huge_val.h \
-  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
-  /usr/include/X11/IntrinsicP.h /usr/include/X11/Intrinsic.h \
-  /usr/include/X11/Xlib.h /usr/include/sys/types.h \
-  /usr/include/bits/types.h /usr/include/bits/typesizes.h \
-  /usr/include/time.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h \
-  /usr/include/endian.h /usr/include/bits/endian.h \
-  /usr/include/sys/select.h /usr/include/bits/select.h \
-  /usr/include/bits/sigset.h /usr/include/bits/time.h \
-  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
-  /usr/include/X11/X.h /usr/include/X11/Xfuncproto.h \
-  /usr/include/X11/Xosdefs.h /usr/include/X11/Xutil.h \
-  /usr/include/X11/keysym.h /usr/include/X11/keysymdef.h \
-  /usr/include/X11/Xresource.h /usr/include/string.h \
-  /usr/include/X11/Core.h /usr/include/X11/Composite.h \
-  /usr/include/X11/Constraint.h /usr/include/X11/Object.h \
-  /usr/include/X11/RectObj.h /usr/include/X11/CoreP.h \
-  /usr/include/X11/CompositeP.h /usr/include/X11/ConstrainP.h \
-  /usr/include/X11/ObjectP.h /usr/include/X11/RectObjP.h \
-  /usr/include/X11/StringDefs.h /usr/include/stdio.h /usr/include/libio.h \
-  /usr/include/_G_config.h /usr/include/wchar.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h \
-  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
-  /usr/include/stdlib.h /usr/include/alloca.h SciPlotP.h SciPlot.h
-
-/usr/include/math.h:
-
-/usr/include/features.h:
-
-/usr/include/sys/cdefs.h:
-
-/usr/include/bits/wordsize.h:
-
-/usr/include/gnu/stubs.h:
-
-/usr/include/gnu/stubs-64.h:
-
-/usr/include/bits/huge_val.h:
-
-/usr/include/bits/mathdef.h:
-
-/usr/include/bits/mathcalls.h:
-
-/usr/include/X11/IntrinsicP.h:
-
-/usr/include/X11/Intrinsic.h:
-
-/usr/include/X11/Xlib.h:
-
-/usr/include/sys/types.h:
-
-/usr/include/bits/types.h:
-
-/usr/include/bits/typesizes.h:
-
-/usr/include/time.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h:
-
-/usr/include/endian.h:
-
-/usr/include/bits/endian.h:
-
-/usr/include/sys/select.h:
-
-/usr/include/bits/select.h:
-
-/usr/include/bits/sigset.h:
-
-/usr/include/bits/time.h:
-
-/usr/include/sys/sysmacros.h:
-
-/usr/include/bits/pthreadtypes.h:
-
-/usr/include/X11/X.h:
-
-/usr/include/X11/Xfuncproto.h:
-
-/usr/include/X11/Xosdefs.h:
-
-/usr/include/X11/Xutil.h:
-
-/usr/include/X11/keysym.h:
-
-/usr/include/X11/keysymdef.h:
-
-/usr/include/X11/Xresource.h:
-
-/usr/include/string.h:
-
-/usr/include/X11/Core.h:
-
-/usr/include/X11/Composite.h:
-
-/usr/include/X11/Constraint.h:
-
-/usr/include/X11/Object.h:
-
-/usr/include/X11/RectObj.h:
-
-/usr/include/X11/CoreP.h:
-
-/usr/include/X11/CompositeP.h:
-
-/usr/include/X11/ConstrainP.h:
-
-/usr/include/X11/ObjectP.h:
-
-/usr/include/X11/RectObjP.h:
-
-/usr/include/X11/StringDefs.h:
-
-/usr/include/stdio.h:
-
-/usr/include/libio.h:
-
-/usr/include/_G_config.h:
-
-/usr/include/wchar.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h:
-
-/usr/include/bits/stdio_lim.h:
-
-/usr/include/bits/sys_errlist.h:
-
-/usr/include/stdlib.h:
-
-/usr/include/alloca.h:
-
-SciPlotP.h:
-
-SciPlot.h:
diff --git a/src/.deps/calcalcs.Po b/src/.deps/calcalcs.Po
deleted file mode 100644
index 24714b3..0000000
--- a/src/.deps/calcalcs.Po
+++ /dev/null
@@ -1,86 +0,0 @@
-calcalcs.o calcalcs.o: calcalcs.c /usr/include/stdio.h \
-  /usr/include/features.h /usr/include/sys/cdefs.h \
-  /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
-  /usr/include/gnu/stubs-64.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h \
-  /usr/include/bits/types.h /usr/include/bits/typesizes.h \
-  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h \
-  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
-  /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
-  /usr/include/endian.h /usr/include/bits/endian.h \
-  /usr/include/sys/select.h /usr/include/bits/select.h \
-  /usr/include/bits/sigset.h /usr/include/bits/time.h \
-  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
-  /usr/include/alloca.h /usr/include/unistd.h \
-  /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \
-  /usr/include/getopt.h /usr/include/string.h /usr/include/ctype.h \
-  calcalcs.h
-
-/usr/include/stdio.h:
-
-/usr/include/features.h:
-
-/usr/include/sys/cdefs.h:
-
-/usr/include/bits/wordsize.h:
-
-/usr/include/gnu/stubs.h:
-
-/usr/include/gnu/stubs-64.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h:
-
-/usr/include/bits/types.h:
-
-/usr/include/bits/typesizes.h:
-
-/usr/include/libio.h:
-
-/usr/include/_G_config.h:
-
-/usr/include/wchar.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h:
-
-/usr/include/bits/stdio_lim.h:
-
-/usr/include/bits/sys_errlist.h:
-
-/usr/include/stdlib.h:
-
-/usr/include/sys/types.h:
-
-/usr/include/time.h:
-
-/usr/include/endian.h:
-
-/usr/include/bits/endian.h:
-
-/usr/include/sys/select.h:
-
-/usr/include/bits/select.h:
-
-/usr/include/bits/sigset.h:
-
-/usr/include/bits/time.h:
-
-/usr/include/sys/sysmacros.h:
-
-/usr/include/bits/pthreadtypes.h:
-
-/usr/include/alloca.h:
-
-/usr/include/unistd.h:
-
-/usr/include/bits/posix_opt.h:
-
-/usr/include/bits/confname.h:
-
-/usr/include/getopt.h:
-
-/usr/include/string.h:
-
-/usr/include/ctype.h:
-
-calcalcs.h:
diff --git a/src/.deps/cbar.Po b/src/.deps/cbar.Po
deleted file mode 100644
index b82ea9a..0000000
--- a/src/.deps/cbar.Po
+++ /dev/null
@@ -1,298 +0,0 @@
-cbar.o cbar.o: interface/cbar.c interface/../ncview.includes.h \
-  /usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \
-  /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
-  /usr/include/gnu/stubs-64.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h \
-  /usr/include/bits/types.h /usr/include/bits/typesizes.h \
-  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h \
-  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
-  /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
-  /usr/include/endian.h /usr/include/bits/endian.h \
-  /usr/include/sys/select.h /usr/include/bits/select.h \
-  /usr/include/bits/sigset.h /usr/include/bits/time.h \
-  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
-  /usr/include/alloca.h /usr/include/dirent.h /usr/include/bits/dirent.h \
-  /usr/include/bits/posix1_lim.h /usr/include/bits/local_lim.h \
-  /usr/include/linux/limits.h /usr/include/sys/stat.h \
-  /usr/include/bits/stat.h /usr/include/fcntl.h /usr/include/bits/fcntl.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/limits.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/syslimits.h \
-  /usr/include/limits.h /usr/include/bits/posix2_lim.h \
-  /usr/include/math.h /usr/include/bits/huge_val.h \
-  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
-  /usr/include/unistd.h /usr/include/bits/posix_opt.h \
-  /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/ctype.h \
-  /usr/include/X11/Intrinsic.h /usr/include/X11/Xlib.h \
-  /usr/include/X11/X.h /usr/include/X11/Xfuncproto.h \
-  /usr/include/X11/Xosdefs.h /usr/include/X11/Xutil.h \
-  /usr/include/X11/keysym.h /usr/include/X11/keysymdef.h \
-  /usr/include/X11/Xresource.h /usr/include/string.h \
-  /usr/include/X11/Core.h /usr/include/X11/Composite.h \
-  /usr/include/X11/Constraint.h /usr/include/X11/Object.h \
-  /usr/include/X11/RectObj.h /usr/include/X11/IntrinsicP.h \
-  /usr/include/X11/CoreP.h /usr/include/X11/CompositeP.h \
-  /usr/include/X11/ConstrainP.h /usr/include/X11/ObjectP.h \
-  /usr/include/X11/RectObjP.h /usr/include/X11/StringDefs.h \
-  /usr/include/X11/cursorfont.h /usr/include/X11/Shell.h \
-  /usr/include/X11/SM/SMlib.h /usr/include/X11/SM/SM.h \
-  /usr/include/X11/ICE/ICElib.h /usr/include/X11/ICE/ICE.h \
-  /usr/include/X11/Xaw/Form.h /usr/include/X11/Xaw/Box.h \
-  /usr/include/X11/Xmu/Converters.h /usr/include/X11/Xaw/Command.h \
-  /usr/include/X11/Xaw/Label.h /usr/include/X11/Xaw/Simple.h \
-  /usr/include/X11/Xaw/Toggle.h /usr/include/X11/Xaw/Dialog.h \
-  /usr/include/X11/Xaw/Scrollbar.h /usr/include/X11/Xaw/Viewport.h \
-  /usr/include/X11/Xaw/Reports.h /usr/include/X11/Xaw/List.h \
-  /usr/include/X11/Xaw/AsciiText.h /usr/include/X11/Xaw/Text.h \
-  /usr/include/X11/Xaw/TextSink.h /usr/include/X11/Xaw/TextSrc.h \
-  /usr/include/X11/Xaw/AsciiSrc.h /usr/include/X11/Xaw/AsciiSink.h \
-  /usr/include/X11/Xaw/MultiSrc.h /usr/include/X11/Xaw/MenuButton.h \
-  /usr/include/X11/Xaw/SimpleMenu.h /usr/include/X11/Xaw/SmeBSB.h \
-  /usr/include/X11/Xaw/Sme.h /usr/include/X11/Xaw/SmeLine.h \
-  interface/../SciPlot.h /home/pierce/include/netcdf.h \
-  /usr/include/errno.h /usr/include/bits/errno.h \
-  /usr/include/linux/errno.h /usr/include/asm/errno.h \
-  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
-  interface/../../config.h interface/../ncview.defines.h \
-  /home/pierce/include/udunits2.h /home/pierce/include/converter.h \
-  interface/../ncview.protos.h interface/../ncview.bitmaps.h \
-  interface/../interface/open_circle_bitmap.h \
-  interface/../interface/closed_circle_bitmap.h interface/helvR08.h
-
-interface/../ncview.includes.h:
-
-/usr/include/stdio.h:
-
-/usr/include/features.h:
-
-/usr/include/sys/cdefs.h:
-
-/usr/include/bits/wordsize.h:
-
-/usr/include/gnu/stubs.h:
-
-/usr/include/gnu/stubs-64.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h:
-
-/usr/include/bits/types.h:
-
-/usr/include/bits/typesizes.h:
-
-/usr/include/libio.h:
-
-/usr/include/_G_config.h:
-
-/usr/include/wchar.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h:
-
-/usr/include/bits/stdio_lim.h:
-
-/usr/include/bits/sys_errlist.h:
-
-/usr/include/stdlib.h:
-
-/usr/include/sys/types.h:
-
-/usr/include/time.h:
-
-/usr/include/endian.h:
-
-/usr/include/bits/endian.h:
-
-/usr/include/sys/select.h:
-
-/usr/include/bits/select.h:
-
-/usr/include/bits/sigset.h:
-
-/usr/include/bits/time.h:
-
-/usr/include/sys/sysmacros.h:
-
-/usr/include/bits/pthreadtypes.h:
-
-/usr/include/alloca.h:
-
-/usr/include/dirent.h:
-
-/usr/include/bits/dirent.h:
-
-/usr/include/bits/posix1_lim.h:
-
-/usr/include/bits/local_lim.h:
-
-/usr/include/linux/limits.h:
-
-/usr/include/sys/stat.h:
-
-/usr/include/bits/stat.h:
-
-/usr/include/fcntl.h:
-
-/usr/include/bits/fcntl.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/limits.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/syslimits.h:
-
-/usr/include/limits.h:
-
-/usr/include/bits/posix2_lim.h:
-
-/usr/include/math.h:
-
-/usr/include/bits/huge_val.h:
-
-/usr/include/bits/mathdef.h:
-
-/usr/include/bits/mathcalls.h:
-
-/usr/include/unistd.h:
-
-/usr/include/bits/posix_opt.h:
-
-/usr/include/bits/confname.h:
-
-/usr/include/getopt.h:
-
-/usr/include/ctype.h:
-
-/usr/include/X11/Intrinsic.h:
-
-/usr/include/X11/Xlib.h:
-
-/usr/include/X11/X.h:
-
-/usr/include/X11/Xfuncproto.h:
-
-/usr/include/X11/Xosdefs.h:
-
-/usr/include/X11/Xutil.h:
-
-/usr/include/X11/keysym.h:
-
-/usr/include/X11/keysymdef.h:
-
-/usr/include/X11/Xresource.h:
-
-/usr/include/string.h:
-
-/usr/include/X11/Core.h:
-
-/usr/include/X11/Composite.h:
-
-/usr/include/X11/Constraint.h:
-
-/usr/include/X11/Object.h:
-
-/usr/include/X11/RectObj.h:
-
-/usr/include/X11/IntrinsicP.h:
-
-/usr/include/X11/CoreP.h:
-
-/usr/include/X11/CompositeP.h:
-
-/usr/include/X11/ConstrainP.h:
-
-/usr/include/X11/ObjectP.h:
-
-/usr/include/X11/RectObjP.h:
-
-/usr/include/X11/StringDefs.h:
-
-/usr/include/X11/cursorfont.h:
-
-/usr/include/X11/Shell.h:
-
-/usr/include/X11/SM/SMlib.h:
-
-/usr/include/X11/SM/SM.h:
-
-/usr/include/X11/ICE/ICElib.h:
-
-/usr/include/X11/ICE/ICE.h:
-
-/usr/include/X11/Xaw/Form.h:
-
-/usr/include/X11/Xaw/Box.h:
-
-/usr/include/X11/Xmu/Converters.h:
-
-/usr/include/X11/Xaw/Command.h:
-
-/usr/include/X11/Xaw/Label.h:
-
-/usr/include/X11/Xaw/Simple.h:
-
-/usr/include/X11/Xaw/Toggle.h:
-
-/usr/include/X11/Xaw/Dialog.h:
-
-/usr/include/X11/Xaw/Scrollbar.h:
-
-/usr/include/X11/Xaw/Viewport.h:
-
-/usr/include/X11/Xaw/Reports.h:
-
-/usr/include/X11/Xaw/List.h:
-
-/usr/include/X11/Xaw/AsciiText.h:
-
-/usr/include/X11/Xaw/Text.h:
-
-/usr/include/X11/Xaw/TextSink.h:
-
-/usr/include/X11/Xaw/TextSrc.h:
-
-/usr/include/X11/Xaw/AsciiSrc.h:
-
-/usr/include/X11/Xaw/AsciiSink.h:
-
-/usr/include/X11/Xaw/MultiSrc.h:
-
-/usr/include/X11/Xaw/MenuButton.h:
-
-/usr/include/X11/Xaw/SimpleMenu.h:
-
-/usr/include/X11/Xaw/SmeBSB.h:
-
-/usr/include/X11/Xaw/Sme.h:
-
-/usr/include/X11/Xaw/SmeLine.h:
-
-interface/../SciPlot.h:
-
-/home/pierce/include/netcdf.h:
-
-/usr/include/errno.h:
-
-/usr/include/bits/errno.h:
-
-/usr/include/linux/errno.h:
-
-/usr/include/asm/errno.h:
-
-/usr/include/asm-generic/errno.h:
-
-/usr/include/asm-generic/errno-base.h:
-
-interface/../../config.h:
-
-interface/../ncview.defines.h:
-
-/home/pierce/include/udunits2.h:
-
-/home/pierce/include/converter.h:
-
-interface/../ncview.protos.h:
-
-interface/../ncview.bitmaps.h:
-
-interface/../interface/open_circle_bitmap.h:
-
-interface/../interface/closed_circle_bitmap.h:
-
-interface/helvR08.h:
diff --git a/src/.deps/dataedit.Po b/src/.deps/dataedit.Po
deleted file mode 100644
index e5a66ab..0000000
--- a/src/.deps/dataedit.Po
+++ /dev/null
@@ -1,289 +0,0 @@
-dataedit.o dataedit.o: interface/dataedit.c \
-  interface/../ncview.includes.h /usr/include/stdio.h \
-  /usr/include/features.h /usr/include/sys/cdefs.h \
-  /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
-  /usr/include/gnu/stubs-64.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h \
-  /usr/include/bits/types.h /usr/include/bits/typesizes.h \
-  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h \
-  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
-  /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
-  /usr/include/endian.h /usr/include/bits/endian.h \
-  /usr/include/sys/select.h /usr/include/bits/select.h \
-  /usr/include/bits/sigset.h /usr/include/bits/time.h \
-  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
-  /usr/include/alloca.h /usr/include/dirent.h /usr/include/bits/dirent.h \
-  /usr/include/bits/posix1_lim.h /usr/include/bits/local_lim.h \
-  /usr/include/linux/limits.h /usr/include/sys/stat.h \
-  /usr/include/bits/stat.h /usr/include/fcntl.h /usr/include/bits/fcntl.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/limits.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/syslimits.h \
-  /usr/include/limits.h /usr/include/bits/posix2_lim.h \
-  /usr/include/math.h /usr/include/bits/huge_val.h \
-  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
-  /usr/include/unistd.h /usr/include/bits/posix_opt.h \
-  /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/ctype.h \
-  /usr/include/X11/Intrinsic.h /usr/include/X11/Xlib.h \
-  /usr/include/X11/X.h /usr/include/X11/Xfuncproto.h \
-  /usr/include/X11/Xosdefs.h /usr/include/X11/Xutil.h \
-  /usr/include/X11/keysym.h /usr/include/X11/keysymdef.h \
-  /usr/include/X11/Xresource.h /usr/include/string.h \
-  /usr/include/X11/Core.h /usr/include/X11/Composite.h \
-  /usr/include/X11/Constraint.h /usr/include/X11/Object.h \
-  /usr/include/X11/RectObj.h /usr/include/X11/IntrinsicP.h \
-  /usr/include/X11/CoreP.h /usr/include/X11/CompositeP.h \
-  /usr/include/X11/ConstrainP.h /usr/include/X11/ObjectP.h \
-  /usr/include/X11/RectObjP.h /usr/include/X11/StringDefs.h \
-  /usr/include/X11/cursorfont.h /usr/include/X11/Shell.h \
-  /usr/include/X11/SM/SMlib.h /usr/include/X11/SM/SM.h \
-  /usr/include/X11/ICE/ICElib.h /usr/include/X11/ICE/ICE.h \
-  /usr/include/X11/Xaw/Form.h /usr/include/X11/Xaw/Box.h \
-  /usr/include/X11/Xmu/Converters.h /usr/include/X11/Xaw/Command.h \
-  /usr/include/X11/Xaw/Label.h /usr/include/X11/Xaw/Simple.h \
-  /usr/include/X11/Xaw/Toggle.h /usr/include/X11/Xaw/Dialog.h \
-  /usr/include/X11/Xaw/Scrollbar.h /usr/include/X11/Xaw/Viewport.h \
-  /usr/include/X11/Xaw/Reports.h /usr/include/X11/Xaw/List.h \
-  /usr/include/X11/Xaw/AsciiText.h /usr/include/X11/Xaw/Text.h \
-  /usr/include/X11/Xaw/TextSink.h /usr/include/X11/Xaw/TextSrc.h \
-  /usr/include/X11/Xaw/AsciiSrc.h /usr/include/X11/Xaw/AsciiSink.h \
-  /usr/include/X11/Xaw/MultiSrc.h /usr/include/X11/Xaw/MenuButton.h \
-  /usr/include/X11/Xaw/SimpleMenu.h /usr/include/X11/Xaw/SmeBSB.h \
-  /usr/include/X11/Xaw/Sme.h /usr/include/X11/Xaw/SmeLine.h \
-  interface/../SciPlot.h /home/pierce/include/netcdf.h \
-  /usr/include/errno.h /usr/include/bits/errno.h \
-  /usr/include/linux/errno.h /usr/include/asm/errno.h \
-  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
-  interface/../../config.h interface/../ncview.defines.h \
-  /home/pierce/include/udunits2.h /home/pierce/include/converter.h \
-  interface/../ncview.protos.h
-
-interface/../ncview.includes.h:
-
-/usr/include/stdio.h:
-
-/usr/include/features.h:
-
-/usr/include/sys/cdefs.h:
-
-/usr/include/bits/wordsize.h:
-
-/usr/include/gnu/stubs.h:
-
-/usr/include/gnu/stubs-64.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h:
-
-/usr/include/bits/types.h:
-
-/usr/include/bits/typesizes.h:
-
-/usr/include/libio.h:
-
-/usr/include/_G_config.h:
-
-/usr/include/wchar.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h:
-
-/usr/include/bits/stdio_lim.h:
-
-/usr/include/bits/sys_errlist.h:
-
-/usr/include/stdlib.h:
-
-/usr/include/sys/types.h:
-
-/usr/include/time.h:
-
-/usr/include/endian.h:
-
-/usr/include/bits/endian.h:
-
-/usr/include/sys/select.h:
-
-/usr/include/bits/select.h:
-
-/usr/include/bits/sigset.h:
-
-/usr/include/bits/time.h:
-
-/usr/include/sys/sysmacros.h:
-
-/usr/include/bits/pthreadtypes.h:
-
-/usr/include/alloca.h:
-
-/usr/include/dirent.h:
-
-/usr/include/bits/dirent.h:
-
-/usr/include/bits/posix1_lim.h:
-
-/usr/include/bits/local_lim.h:
-
-/usr/include/linux/limits.h:
-
-/usr/include/sys/stat.h:
-
-/usr/include/bits/stat.h:
-
-/usr/include/fcntl.h:
-
-/usr/include/bits/fcntl.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/limits.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/syslimits.h:
-
-/usr/include/limits.h:
-
-/usr/include/bits/posix2_lim.h:
-
-/usr/include/math.h:
-
-/usr/include/bits/huge_val.h:
-
-/usr/include/bits/mathdef.h:
-
-/usr/include/bits/mathcalls.h:
-
-/usr/include/unistd.h:
-
-/usr/include/bits/posix_opt.h:
-
-/usr/include/bits/confname.h:
-
-/usr/include/getopt.h:
-
-/usr/include/ctype.h:
-
-/usr/include/X11/Intrinsic.h:
-
-/usr/include/X11/Xlib.h:
-
-/usr/include/X11/X.h:
-
-/usr/include/X11/Xfuncproto.h:
-
-/usr/include/X11/Xosdefs.h:
-
-/usr/include/X11/Xutil.h:
-
-/usr/include/X11/keysym.h:
-
-/usr/include/X11/keysymdef.h:
-
-/usr/include/X11/Xresource.h:
-
-/usr/include/string.h:
-
-/usr/include/X11/Core.h:
-
-/usr/include/X11/Composite.h:
-
-/usr/include/X11/Constraint.h:
-
-/usr/include/X11/Object.h:
-
-/usr/include/X11/RectObj.h:
-
-/usr/include/X11/IntrinsicP.h:
-
-/usr/include/X11/CoreP.h:
-
-/usr/include/X11/CompositeP.h:
-
-/usr/include/X11/ConstrainP.h:
-
-/usr/include/X11/ObjectP.h:
-
-/usr/include/X11/RectObjP.h:
-
-/usr/include/X11/StringDefs.h:
-
-/usr/include/X11/cursorfont.h:
-
-/usr/include/X11/Shell.h:
-
-/usr/include/X11/SM/SMlib.h:
-
-/usr/include/X11/SM/SM.h:
-
-/usr/include/X11/ICE/ICElib.h:
-
-/usr/include/X11/ICE/ICE.h:
-
-/usr/include/X11/Xaw/Form.h:
-
-/usr/include/X11/Xaw/Box.h:
-
-/usr/include/X11/Xmu/Converters.h:
-
-/usr/include/X11/Xaw/Command.h:
-
-/usr/include/X11/Xaw/Label.h:
-
-/usr/include/X11/Xaw/Simple.h:
-
-/usr/include/X11/Xaw/Toggle.h:
-
-/usr/include/X11/Xaw/Dialog.h:
-
-/usr/include/X11/Xaw/Scrollbar.h:
-
-/usr/include/X11/Xaw/Viewport.h:
-
-/usr/include/X11/Xaw/Reports.h:
-
-/usr/include/X11/Xaw/List.h:
-
-/usr/include/X11/Xaw/AsciiText.h:
-
-/usr/include/X11/Xaw/Text.h:
-
-/usr/include/X11/Xaw/TextSink.h:
-
-/usr/include/X11/Xaw/TextSrc.h:
-
-/usr/include/X11/Xaw/AsciiSrc.h:
-
-/usr/include/X11/Xaw/AsciiSink.h:
-
-/usr/include/X11/Xaw/MultiSrc.h:
-
-/usr/include/X11/Xaw/MenuButton.h:
-
-/usr/include/X11/Xaw/SimpleMenu.h:
-
-/usr/include/X11/Xaw/SmeBSB.h:
-
-/usr/include/X11/Xaw/Sme.h:
-
-/usr/include/X11/Xaw/SmeLine.h:
-
-interface/../SciPlot.h:
-
-/home/pierce/include/netcdf.h:
-
-/usr/include/errno.h:
-
-/usr/include/bits/errno.h:
-
-/usr/include/linux/errno.h:
-
-/usr/include/asm/errno.h:
-
-/usr/include/asm-generic/errno.h:
-
-/usr/include/asm-generic/errno-base.h:
-
-interface/../../config.h:
-
-interface/../ncview.defines.h:
-
-/home/pierce/include/udunits2.h:
-
-/home/pierce/include/converter.h:
-
-interface/../ncview.protos.h:
diff --git a/src/.deps/display_info.Po b/src/.deps/display_info.Po
deleted file mode 100644
index 0b29282..0000000
--- a/src/.deps/display_info.Po
+++ /dev/null
@@ -1,289 +0,0 @@
-display_info.o display_info.o: interface/display_info.c \
-  interface/../ncview.includes.h /usr/include/stdio.h \
-  /usr/include/features.h /usr/include/sys/cdefs.h \
-  /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
-  /usr/include/gnu/stubs-64.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h \
-  /usr/include/bits/types.h /usr/include/bits/typesizes.h \
-  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h \
-  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
-  /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
-  /usr/include/endian.h /usr/include/bits/endian.h \
-  /usr/include/sys/select.h /usr/include/bits/select.h \
-  /usr/include/bits/sigset.h /usr/include/bits/time.h \
-  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
-  /usr/include/alloca.h /usr/include/dirent.h /usr/include/bits/dirent.h \
-  /usr/include/bits/posix1_lim.h /usr/include/bits/local_lim.h \
-  /usr/include/linux/limits.h /usr/include/sys/stat.h \
-  /usr/include/bits/stat.h /usr/include/fcntl.h /usr/include/bits/fcntl.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/limits.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/syslimits.h \
-  /usr/include/limits.h /usr/include/bits/posix2_lim.h \
-  /usr/include/math.h /usr/include/bits/huge_val.h \
-  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
-  /usr/include/unistd.h /usr/include/bits/posix_opt.h \
-  /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/ctype.h \
-  /usr/include/X11/Intrinsic.h /usr/include/X11/Xlib.h \
-  /usr/include/X11/X.h /usr/include/X11/Xfuncproto.h \
-  /usr/include/X11/Xosdefs.h /usr/include/X11/Xutil.h \
-  /usr/include/X11/keysym.h /usr/include/X11/keysymdef.h \
-  /usr/include/X11/Xresource.h /usr/include/string.h \
-  /usr/include/X11/Core.h /usr/include/X11/Composite.h \
-  /usr/include/X11/Constraint.h /usr/include/X11/Object.h \
-  /usr/include/X11/RectObj.h /usr/include/X11/IntrinsicP.h \
-  /usr/include/X11/CoreP.h /usr/include/X11/CompositeP.h \
-  /usr/include/X11/ConstrainP.h /usr/include/X11/ObjectP.h \
-  /usr/include/X11/RectObjP.h /usr/include/X11/StringDefs.h \
-  /usr/include/X11/cursorfont.h /usr/include/X11/Shell.h \
-  /usr/include/X11/SM/SMlib.h /usr/include/X11/SM/SM.h \
-  /usr/include/X11/ICE/ICElib.h /usr/include/X11/ICE/ICE.h \
-  /usr/include/X11/Xaw/Form.h /usr/include/X11/Xaw/Box.h \
-  /usr/include/X11/Xmu/Converters.h /usr/include/X11/Xaw/Command.h \
-  /usr/include/X11/Xaw/Label.h /usr/include/X11/Xaw/Simple.h \
-  /usr/include/X11/Xaw/Toggle.h /usr/include/X11/Xaw/Dialog.h \
-  /usr/include/X11/Xaw/Scrollbar.h /usr/include/X11/Xaw/Viewport.h \
-  /usr/include/X11/Xaw/Reports.h /usr/include/X11/Xaw/List.h \
-  /usr/include/X11/Xaw/AsciiText.h /usr/include/X11/Xaw/Text.h \
-  /usr/include/X11/Xaw/TextSink.h /usr/include/X11/Xaw/TextSrc.h \
-  /usr/include/X11/Xaw/AsciiSrc.h /usr/include/X11/Xaw/AsciiSink.h \
-  /usr/include/X11/Xaw/MultiSrc.h /usr/include/X11/Xaw/MenuButton.h \
-  /usr/include/X11/Xaw/SimpleMenu.h /usr/include/X11/Xaw/SmeBSB.h \
-  /usr/include/X11/Xaw/Sme.h /usr/include/X11/Xaw/SmeLine.h \
-  interface/../SciPlot.h /home/pierce/include/netcdf.h \
-  /usr/include/errno.h /usr/include/bits/errno.h \
-  /usr/include/linux/errno.h /usr/include/asm/errno.h \
-  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
-  interface/../../config.h interface/../ncview.defines.h \
-  /home/pierce/include/udunits2.h /home/pierce/include/converter.h \
-  interface/../ncview.protos.h
-
-interface/../ncview.includes.h:
-
-/usr/include/stdio.h:
-
-/usr/include/features.h:
-
-/usr/include/sys/cdefs.h:
-
-/usr/include/bits/wordsize.h:
-
-/usr/include/gnu/stubs.h:
-
-/usr/include/gnu/stubs-64.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h:
-
-/usr/include/bits/types.h:
-
-/usr/include/bits/typesizes.h:
-
-/usr/include/libio.h:
-
-/usr/include/_G_config.h:
-
-/usr/include/wchar.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h:
-
-/usr/include/bits/stdio_lim.h:
-
-/usr/include/bits/sys_errlist.h:
-
-/usr/include/stdlib.h:
-
-/usr/include/sys/types.h:
-
-/usr/include/time.h:
-
-/usr/include/endian.h:
-
-/usr/include/bits/endian.h:
-
-/usr/include/sys/select.h:
-
-/usr/include/bits/select.h:
-
-/usr/include/bits/sigset.h:
-
-/usr/include/bits/time.h:
-
-/usr/include/sys/sysmacros.h:
-
-/usr/include/bits/pthreadtypes.h:
-
-/usr/include/alloca.h:
-
-/usr/include/dirent.h:
-
-/usr/include/bits/dirent.h:
-
-/usr/include/bits/posix1_lim.h:
-
-/usr/include/bits/local_lim.h:
-
-/usr/include/linux/limits.h:
-
-/usr/include/sys/stat.h:
-
-/usr/include/bits/stat.h:
-
-/usr/include/fcntl.h:
-
-/usr/include/bits/fcntl.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/limits.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/syslimits.h:
-
-/usr/include/limits.h:
-
-/usr/include/bits/posix2_lim.h:
-
-/usr/include/math.h:
-
-/usr/include/bits/huge_val.h:
-
-/usr/include/bits/mathdef.h:
-
-/usr/include/bits/mathcalls.h:
-
-/usr/include/unistd.h:
-
-/usr/include/bits/posix_opt.h:
-
-/usr/include/bits/confname.h:
-
-/usr/include/getopt.h:
-
-/usr/include/ctype.h:
-
-/usr/include/X11/Intrinsic.h:
-
-/usr/include/X11/Xlib.h:
-
-/usr/include/X11/X.h:
-
-/usr/include/X11/Xfuncproto.h:
-
-/usr/include/X11/Xosdefs.h:
-
-/usr/include/X11/Xutil.h:
-
-/usr/include/X11/keysym.h:
-
-/usr/include/X11/keysymdef.h:
-
-/usr/include/X11/Xresource.h:
-
-/usr/include/string.h:
-
-/usr/include/X11/Core.h:
-
-/usr/include/X11/Composite.h:
-
-/usr/include/X11/Constraint.h:
-
-/usr/include/X11/Object.h:
-
-/usr/include/X11/RectObj.h:
-
-/usr/include/X11/IntrinsicP.h:
-
-/usr/include/X11/CoreP.h:
-
-/usr/include/X11/CompositeP.h:
-
-/usr/include/X11/ConstrainP.h:
-
-/usr/include/X11/ObjectP.h:
-
-/usr/include/X11/RectObjP.h:
-
-/usr/include/X11/StringDefs.h:
-
-/usr/include/X11/cursorfont.h:
-
-/usr/include/X11/Shell.h:
-
-/usr/include/X11/SM/SMlib.h:
-
-/usr/include/X11/SM/SM.h:
-
-/usr/include/X11/ICE/ICElib.h:
-
-/usr/include/X11/ICE/ICE.h:
-
-/usr/include/X11/Xaw/Form.h:
-
-/usr/include/X11/Xaw/Box.h:
-
-/usr/include/X11/Xmu/Converters.h:
-
-/usr/include/X11/Xaw/Command.h:
-
-/usr/include/X11/Xaw/Label.h:
-
-/usr/include/X11/Xaw/Simple.h:
-
-/usr/include/X11/Xaw/Toggle.h:
-
-/usr/include/X11/Xaw/Dialog.h:
-
-/usr/include/X11/Xaw/Scrollbar.h:
-
-/usr/include/X11/Xaw/Viewport.h:
-
-/usr/include/X11/Xaw/Reports.h:
-
-/usr/include/X11/Xaw/List.h:
-
-/usr/include/X11/Xaw/AsciiText.h:
-
-/usr/include/X11/Xaw/Text.h:
-
-/usr/include/X11/Xaw/TextSink.h:
-
-/usr/include/X11/Xaw/TextSrc.h:
-
-/usr/include/X11/Xaw/AsciiSrc.h:
-
-/usr/include/X11/Xaw/AsciiSink.h:
-
-/usr/include/X11/Xaw/MultiSrc.h:
-
-/usr/include/X11/Xaw/MenuButton.h:
-
-/usr/include/X11/Xaw/SimpleMenu.h:
-
-/usr/include/X11/Xaw/SmeBSB.h:
-
-/usr/include/X11/Xaw/Sme.h:
-
-/usr/include/X11/Xaw/SmeLine.h:
-
-interface/../SciPlot.h:
-
-/home/pierce/include/netcdf.h:
-
-/usr/include/errno.h:
-
-/usr/include/bits/errno.h:
-
-/usr/include/linux/errno.h:
-
-/usr/include/asm/errno.h:
-
-/usr/include/asm-generic/errno.h:
-
-/usr/include/asm-generic/errno-base.h:
-
-interface/../../config.h:
-
-interface/../ncview.defines.h:
-
-/home/pierce/include/udunits2.h:
-
-/home/pierce/include/converter.h:
-
-interface/../ncview.protos.h:
diff --git a/src/.deps/do_buttons.Po b/src/.deps/do_buttons.Po
deleted file mode 100644
index 690111d..0000000
--- a/src/.deps/do_buttons.Po
+++ /dev/null
@@ -1,287 +0,0 @@
-do_buttons.o do_buttons.o: do_buttons.c ncview.includes.h \
-  /usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \
-  /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
-  /usr/include/gnu/stubs-64.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h \
-  /usr/include/bits/types.h /usr/include/bits/typesizes.h \
-  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h \
-  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
-  /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
-  /usr/include/endian.h /usr/include/bits/endian.h \
-  /usr/include/sys/select.h /usr/include/bits/select.h \
-  /usr/include/bits/sigset.h /usr/include/bits/time.h \
-  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
-  /usr/include/alloca.h /usr/include/dirent.h /usr/include/bits/dirent.h \
-  /usr/include/bits/posix1_lim.h /usr/include/bits/local_lim.h \
-  /usr/include/linux/limits.h /usr/include/sys/stat.h \
-  /usr/include/bits/stat.h /usr/include/fcntl.h /usr/include/bits/fcntl.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/limits.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/syslimits.h \
-  /usr/include/limits.h /usr/include/bits/posix2_lim.h \
-  /usr/include/math.h /usr/include/bits/huge_val.h \
-  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
-  /usr/include/unistd.h /usr/include/bits/posix_opt.h \
-  /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/ctype.h \
-  /usr/include/X11/Intrinsic.h /usr/include/X11/Xlib.h \
-  /usr/include/X11/X.h /usr/include/X11/Xfuncproto.h \
-  /usr/include/X11/Xosdefs.h /usr/include/X11/Xutil.h \
-  /usr/include/X11/keysym.h /usr/include/X11/keysymdef.h \
-  /usr/include/X11/Xresource.h /usr/include/string.h \
-  /usr/include/X11/Core.h /usr/include/X11/Composite.h \
-  /usr/include/X11/Constraint.h /usr/include/X11/Object.h \
-  /usr/include/X11/RectObj.h /usr/include/X11/IntrinsicP.h \
-  /usr/include/X11/CoreP.h /usr/include/X11/CompositeP.h \
-  /usr/include/X11/ConstrainP.h /usr/include/X11/ObjectP.h \
-  /usr/include/X11/RectObjP.h /usr/include/X11/StringDefs.h \
-  /usr/include/X11/cursorfont.h /usr/include/X11/Shell.h \
-  /usr/include/X11/SM/SMlib.h /usr/include/X11/SM/SM.h \
-  /usr/include/X11/ICE/ICElib.h /usr/include/X11/ICE/ICE.h \
-  /usr/include/X11/Xaw/Form.h /usr/include/X11/Xaw/Box.h \
-  /usr/include/X11/Xmu/Converters.h /usr/include/X11/Xaw/Command.h \
-  /usr/include/X11/Xaw/Label.h /usr/include/X11/Xaw/Simple.h \
-  /usr/include/X11/Xaw/Toggle.h /usr/include/X11/Xaw/Dialog.h \
-  /usr/include/X11/Xaw/Scrollbar.h /usr/include/X11/Xaw/Viewport.h \
-  /usr/include/X11/Xaw/Reports.h /usr/include/X11/Xaw/List.h \
-  /usr/include/X11/Xaw/AsciiText.h /usr/include/X11/Xaw/Text.h \
-  /usr/include/X11/Xaw/TextSink.h /usr/include/X11/Xaw/TextSrc.h \
-  /usr/include/X11/Xaw/AsciiSrc.h /usr/include/X11/Xaw/AsciiSink.h \
-  /usr/include/X11/Xaw/MultiSrc.h /usr/include/X11/Xaw/MenuButton.h \
-  /usr/include/X11/Xaw/SimpleMenu.h /usr/include/X11/Xaw/SmeBSB.h \
-  /usr/include/X11/Xaw/Sme.h /usr/include/X11/Xaw/SmeLine.h SciPlot.h \
-  /home/pierce/include/netcdf.h /usr/include/errno.h \
-  /usr/include/bits/errno.h /usr/include/linux/errno.h \
-  /usr/include/asm/errno.h /usr/include/asm-generic/errno.h \
-  /usr/include/asm-generic/errno-base.h ../config.h ncview.defines.h \
-  /home/pierce/include/udunits2.h /home/pierce/include/converter.h \
-  ncview.protos.h
-
-ncview.includes.h:
-
-/usr/include/stdio.h:
-
-/usr/include/features.h:
-
-/usr/include/sys/cdefs.h:
-
-/usr/include/bits/wordsize.h:
-
-/usr/include/gnu/stubs.h:
-
-/usr/include/gnu/stubs-64.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h:
-
-/usr/include/bits/types.h:
-
-/usr/include/bits/typesizes.h:
-
-/usr/include/libio.h:
-
-/usr/include/_G_config.h:
-
-/usr/include/wchar.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h:
-
-/usr/include/bits/stdio_lim.h:
-
-/usr/include/bits/sys_errlist.h:
-
-/usr/include/stdlib.h:
-
-/usr/include/sys/types.h:
-
-/usr/include/time.h:
-
-/usr/include/endian.h:
-
-/usr/include/bits/endian.h:
-
-/usr/include/sys/select.h:
-
-/usr/include/bits/select.h:
-
-/usr/include/bits/sigset.h:
-
-/usr/include/bits/time.h:
-
-/usr/include/sys/sysmacros.h:
-
-/usr/include/bits/pthreadtypes.h:
-
-/usr/include/alloca.h:
-
-/usr/include/dirent.h:
-
-/usr/include/bits/dirent.h:
-
-/usr/include/bits/posix1_lim.h:
-
-/usr/include/bits/local_lim.h:
-
-/usr/include/linux/limits.h:
-
-/usr/include/sys/stat.h:
-
-/usr/include/bits/stat.h:
-
-/usr/include/fcntl.h:
-
-/usr/include/bits/fcntl.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/limits.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/syslimits.h:
-
-/usr/include/limits.h:
-
-/usr/include/bits/posix2_lim.h:
-
-/usr/include/math.h:
-
-/usr/include/bits/huge_val.h:
-
-/usr/include/bits/mathdef.h:
-
-/usr/include/bits/mathcalls.h:
-
-/usr/include/unistd.h:
-
-/usr/include/bits/posix_opt.h:
-
-/usr/include/bits/confname.h:
-
-/usr/include/getopt.h:
-
-/usr/include/ctype.h:
-
-/usr/include/X11/Intrinsic.h:
-
-/usr/include/X11/Xlib.h:
-
-/usr/include/X11/X.h:
-
-/usr/include/X11/Xfuncproto.h:
-
-/usr/include/X11/Xosdefs.h:
-
-/usr/include/X11/Xutil.h:
-
-/usr/include/X11/keysym.h:
-
-/usr/include/X11/keysymdef.h:
-
-/usr/include/X11/Xresource.h:
-
-/usr/include/string.h:
-
-/usr/include/X11/Core.h:
-
-/usr/include/X11/Composite.h:
-
-/usr/include/X11/Constraint.h:
-
-/usr/include/X11/Object.h:
-
-/usr/include/X11/RectObj.h:
-
-/usr/include/X11/IntrinsicP.h:
-
-/usr/include/X11/CoreP.h:
-
-/usr/include/X11/CompositeP.h:
-
-/usr/include/X11/ConstrainP.h:
-
-/usr/include/X11/ObjectP.h:
-
-/usr/include/X11/RectObjP.h:
-
-/usr/include/X11/StringDefs.h:
-
-/usr/include/X11/cursorfont.h:
-
-/usr/include/X11/Shell.h:
-
-/usr/include/X11/SM/SMlib.h:
-
-/usr/include/X11/SM/SM.h:
-
-/usr/include/X11/ICE/ICElib.h:
-
-/usr/include/X11/ICE/ICE.h:
-
-/usr/include/X11/Xaw/Form.h:
-
-/usr/include/X11/Xaw/Box.h:
-
-/usr/include/X11/Xmu/Converters.h:
-
-/usr/include/X11/Xaw/Command.h:
-
-/usr/include/X11/Xaw/Label.h:
-
-/usr/include/X11/Xaw/Simple.h:
-
-/usr/include/X11/Xaw/Toggle.h:
-
-/usr/include/X11/Xaw/Dialog.h:
-
-/usr/include/X11/Xaw/Scrollbar.h:
-
-/usr/include/X11/Xaw/Viewport.h:
-
-/usr/include/X11/Xaw/Reports.h:
-
-/usr/include/X11/Xaw/List.h:
-
-/usr/include/X11/Xaw/AsciiText.h:
-
-/usr/include/X11/Xaw/Text.h:
-
-/usr/include/X11/Xaw/TextSink.h:
-
-/usr/include/X11/Xaw/TextSrc.h:
-
-/usr/include/X11/Xaw/AsciiSrc.h:
-
-/usr/include/X11/Xaw/AsciiSink.h:
-
-/usr/include/X11/Xaw/MultiSrc.h:
-
-/usr/include/X11/Xaw/MenuButton.h:
-
-/usr/include/X11/Xaw/SimpleMenu.h:
-
-/usr/include/X11/Xaw/SmeBSB.h:
-
-/usr/include/X11/Xaw/Sme.h:
-
-/usr/include/X11/Xaw/SmeLine.h:
-
-SciPlot.h:
-
-/home/pierce/include/netcdf.h:
-
-/usr/include/errno.h:
-
-/usr/include/bits/errno.h:
-
-/usr/include/linux/errno.h:
-
-/usr/include/asm/errno.h:
-
-/usr/include/asm-generic/errno.h:
-
-/usr/include/asm-generic/errno-base.h:
-
-../config.h:
-
-ncview.defines.h:
-
-/home/pierce/include/udunits2.h:
-
-/home/pierce/include/converter.h:
-
-ncview.protos.h:
diff --git a/src/.deps/do_print.Po b/src/.deps/do_print.Po
deleted file mode 100644
index 7b8d4f5..0000000
--- a/src/.deps/do_print.Po
+++ /dev/null
@@ -1,287 +0,0 @@
-do_print.o do_print.o: do_print.c ncview.includes.h /usr/include/stdio.h \
-  /usr/include/features.h /usr/include/sys/cdefs.h \
-  /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
-  /usr/include/gnu/stubs-64.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h \
-  /usr/include/bits/types.h /usr/include/bits/typesizes.h \
-  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h \
-  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
-  /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
-  /usr/include/endian.h /usr/include/bits/endian.h \
-  /usr/include/sys/select.h /usr/include/bits/select.h \
-  /usr/include/bits/sigset.h /usr/include/bits/time.h \
-  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
-  /usr/include/alloca.h /usr/include/dirent.h /usr/include/bits/dirent.h \
-  /usr/include/bits/posix1_lim.h /usr/include/bits/local_lim.h \
-  /usr/include/linux/limits.h /usr/include/sys/stat.h \
-  /usr/include/bits/stat.h /usr/include/fcntl.h /usr/include/bits/fcntl.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/limits.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/syslimits.h \
-  /usr/include/limits.h /usr/include/bits/posix2_lim.h \
-  /usr/include/math.h /usr/include/bits/huge_val.h \
-  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
-  /usr/include/unistd.h /usr/include/bits/posix_opt.h \
-  /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/ctype.h \
-  /usr/include/X11/Intrinsic.h /usr/include/X11/Xlib.h \
-  /usr/include/X11/X.h /usr/include/X11/Xfuncproto.h \
-  /usr/include/X11/Xosdefs.h /usr/include/X11/Xutil.h \
-  /usr/include/X11/keysym.h /usr/include/X11/keysymdef.h \
-  /usr/include/X11/Xresource.h /usr/include/string.h \
-  /usr/include/X11/Core.h /usr/include/X11/Composite.h \
-  /usr/include/X11/Constraint.h /usr/include/X11/Object.h \
-  /usr/include/X11/RectObj.h /usr/include/X11/IntrinsicP.h \
-  /usr/include/X11/CoreP.h /usr/include/X11/CompositeP.h \
-  /usr/include/X11/ConstrainP.h /usr/include/X11/ObjectP.h \
-  /usr/include/X11/RectObjP.h /usr/include/X11/StringDefs.h \
-  /usr/include/X11/cursorfont.h /usr/include/X11/Shell.h \
-  /usr/include/X11/SM/SMlib.h /usr/include/X11/SM/SM.h \
-  /usr/include/X11/ICE/ICElib.h /usr/include/X11/ICE/ICE.h \
-  /usr/include/X11/Xaw/Form.h /usr/include/X11/Xaw/Box.h \
-  /usr/include/X11/Xmu/Converters.h /usr/include/X11/Xaw/Command.h \
-  /usr/include/X11/Xaw/Label.h /usr/include/X11/Xaw/Simple.h \
-  /usr/include/X11/Xaw/Toggle.h /usr/include/X11/Xaw/Dialog.h \
-  /usr/include/X11/Xaw/Scrollbar.h /usr/include/X11/Xaw/Viewport.h \
-  /usr/include/X11/Xaw/Reports.h /usr/include/X11/Xaw/List.h \
-  /usr/include/X11/Xaw/AsciiText.h /usr/include/X11/Xaw/Text.h \
-  /usr/include/X11/Xaw/TextSink.h /usr/include/X11/Xaw/TextSrc.h \
-  /usr/include/X11/Xaw/AsciiSrc.h /usr/include/X11/Xaw/AsciiSink.h \
-  /usr/include/X11/Xaw/MultiSrc.h /usr/include/X11/Xaw/MenuButton.h \
-  /usr/include/X11/Xaw/SimpleMenu.h /usr/include/X11/Xaw/SmeBSB.h \
-  /usr/include/X11/Xaw/Sme.h /usr/include/X11/Xaw/SmeLine.h SciPlot.h \
-  /home/pierce/include/netcdf.h /usr/include/errno.h \
-  /usr/include/bits/errno.h /usr/include/linux/errno.h \
-  /usr/include/asm/errno.h /usr/include/asm-generic/errno.h \
-  /usr/include/asm-generic/errno-base.h ../config.h ncview.defines.h \
-  /home/pierce/include/udunits2.h /home/pierce/include/converter.h \
-  ncview.protos.h
-
-ncview.includes.h:
-
-/usr/include/stdio.h:
-
-/usr/include/features.h:
-
-/usr/include/sys/cdefs.h:
-
-/usr/include/bits/wordsize.h:
-
-/usr/include/gnu/stubs.h:
-
-/usr/include/gnu/stubs-64.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h:
-
-/usr/include/bits/types.h:
-
-/usr/include/bits/typesizes.h:
-
-/usr/include/libio.h:
-
-/usr/include/_G_config.h:
-
-/usr/include/wchar.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h:
-
-/usr/include/bits/stdio_lim.h:
-
-/usr/include/bits/sys_errlist.h:
-
-/usr/include/stdlib.h:
-
-/usr/include/sys/types.h:
-
-/usr/include/time.h:
-
-/usr/include/endian.h:
-
-/usr/include/bits/endian.h:
-
-/usr/include/sys/select.h:
-
-/usr/include/bits/select.h:
-
-/usr/include/bits/sigset.h:
-
-/usr/include/bits/time.h:
-
-/usr/include/sys/sysmacros.h:
-
-/usr/include/bits/pthreadtypes.h:
-
-/usr/include/alloca.h:
-
-/usr/include/dirent.h:
-
-/usr/include/bits/dirent.h:
-
-/usr/include/bits/posix1_lim.h:
-
-/usr/include/bits/local_lim.h:
-
-/usr/include/linux/limits.h:
-
-/usr/include/sys/stat.h:
-
-/usr/include/bits/stat.h:
-
-/usr/include/fcntl.h:
-
-/usr/include/bits/fcntl.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/limits.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/syslimits.h:
-
-/usr/include/limits.h:
-
-/usr/include/bits/posix2_lim.h:
-
-/usr/include/math.h:
-
-/usr/include/bits/huge_val.h:
-
-/usr/include/bits/mathdef.h:
-
-/usr/include/bits/mathcalls.h:
-
-/usr/include/unistd.h:
-
-/usr/include/bits/posix_opt.h:
-
-/usr/include/bits/confname.h:
-
-/usr/include/getopt.h:
-
-/usr/include/ctype.h:
-
-/usr/include/X11/Intrinsic.h:
-
-/usr/include/X11/Xlib.h:
-
-/usr/include/X11/X.h:
-
-/usr/include/X11/Xfuncproto.h:
-
-/usr/include/X11/Xosdefs.h:
-
-/usr/include/X11/Xutil.h:
-
-/usr/include/X11/keysym.h:
-
-/usr/include/X11/keysymdef.h:
-
-/usr/include/X11/Xresource.h:
-
-/usr/include/string.h:
-
-/usr/include/X11/Core.h:
-
-/usr/include/X11/Composite.h:
-
-/usr/include/X11/Constraint.h:
-
-/usr/include/X11/Object.h:
-
-/usr/include/X11/RectObj.h:
-
-/usr/include/X11/IntrinsicP.h:
-
-/usr/include/X11/CoreP.h:
-
-/usr/include/X11/CompositeP.h:
-
-/usr/include/X11/ConstrainP.h:
-
-/usr/include/X11/ObjectP.h:
-
-/usr/include/X11/RectObjP.h:
-
-/usr/include/X11/StringDefs.h:
-
-/usr/include/X11/cursorfont.h:
-
-/usr/include/X11/Shell.h:
-
-/usr/include/X11/SM/SMlib.h:
-
-/usr/include/X11/SM/SM.h:
-
-/usr/include/X11/ICE/ICElib.h:
-
-/usr/include/X11/ICE/ICE.h:
-
-/usr/include/X11/Xaw/Form.h:
-
-/usr/include/X11/Xaw/Box.h:
-
-/usr/include/X11/Xmu/Converters.h:
-
-/usr/include/X11/Xaw/Command.h:
-
-/usr/include/X11/Xaw/Label.h:
-
-/usr/include/X11/Xaw/Simple.h:
-
-/usr/include/X11/Xaw/Toggle.h:
-
-/usr/include/X11/Xaw/Dialog.h:
-
-/usr/include/X11/Xaw/Scrollbar.h:
-
-/usr/include/X11/Xaw/Viewport.h:
-
-/usr/include/X11/Xaw/Reports.h:
-
-/usr/include/X11/Xaw/List.h:
-
-/usr/include/X11/Xaw/AsciiText.h:
-
-/usr/include/X11/Xaw/Text.h:
-
-/usr/include/X11/Xaw/TextSink.h:
-
-/usr/include/X11/Xaw/TextSrc.h:
-
-/usr/include/X11/Xaw/AsciiSrc.h:
-
-/usr/include/X11/Xaw/AsciiSink.h:
-
-/usr/include/X11/Xaw/MultiSrc.h:
-
-/usr/include/X11/Xaw/MenuButton.h:
-
-/usr/include/X11/Xaw/SimpleMenu.h:
-
-/usr/include/X11/Xaw/SmeBSB.h:
-
-/usr/include/X11/Xaw/Sme.h:
-
-/usr/include/X11/Xaw/SmeLine.h:
-
-SciPlot.h:
-
-/home/pierce/include/netcdf.h:
-
-/usr/include/errno.h:
-
-/usr/include/bits/errno.h:
-
-/usr/include/linux/errno.h:
-
-/usr/include/asm/errno.h:
-
-/usr/include/asm-generic/errno.h:
-
-/usr/include/asm-generic/errno-base.h:
-
-../config.h:
-
-ncview.defines.h:
-
-/home/pierce/include/udunits2.h:
-
-/home/pierce/include/converter.h:
-
-ncview.protos.h:
diff --git a/src/.deps/epic_time.Po b/src/.deps/epic_time.Po
deleted file mode 100644
index 1bcec10..0000000
--- a/src/.deps/epic_time.Po
+++ /dev/null
@@ -1,287 +0,0 @@
-epic_time.o epic_time.o: epic_time.c ncview.includes.h \
-  /usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \
-  /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
-  /usr/include/gnu/stubs-64.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h \
-  /usr/include/bits/types.h /usr/include/bits/typesizes.h \
-  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h \
-  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
-  /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
-  /usr/include/endian.h /usr/include/bits/endian.h \
-  /usr/include/sys/select.h /usr/include/bits/select.h \
-  /usr/include/bits/sigset.h /usr/include/bits/time.h \
-  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
-  /usr/include/alloca.h /usr/include/dirent.h /usr/include/bits/dirent.h \
-  /usr/include/bits/posix1_lim.h /usr/include/bits/local_lim.h \
-  /usr/include/linux/limits.h /usr/include/sys/stat.h \
-  /usr/include/bits/stat.h /usr/include/fcntl.h /usr/include/bits/fcntl.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/limits.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/syslimits.h \
-  /usr/include/limits.h /usr/include/bits/posix2_lim.h \
-  /usr/include/math.h /usr/include/bits/huge_val.h \
-  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
-  /usr/include/unistd.h /usr/include/bits/posix_opt.h \
-  /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/ctype.h \
-  /usr/include/X11/Intrinsic.h /usr/include/X11/Xlib.h \
-  /usr/include/X11/X.h /usr/include/X11/Xfuncproto.h \
-  /usr/include/X11/Xosdefs.h /usr/include/X11/Xutil.h \
-  /usr/include/X11/keysym.h /usr/include/X11/keysymdef.h \
-  /usr/include/X11/Xresource.h /usr/include/string.h \
-  /usr/include/X11/Core.h /usr/include/X11/Composite.h \
-  /usr/include/X11/Constraint.h /usr/include/X11/Object.h \
-  /usr/include/X11/RectObj.h /usr/include/X11/IntrinsicP.h \
-  /usr/include/X11/CoreP.h /usr/include/X11/CompositeP.h \
-  /usr/include/X11/ConstrainP.h /usr/include/X11/ObjectP.h \
-  /usr/include/X11/RectObjP.h /usr/include/X11/StringDefs.h \
-  /usr/include/X11/cursorfont.h /usr/include/X11/Shell.h \
-  /usr/include/X11/SM/SMlib.h /usr/include/X11/SM/SM.h \
-  /usr/include/X11/ICE/ICElib.h /usr/include/X11/ICE/ICE.h \
-  /usr/include/X11/Xaw/Form.h /usr/include/X11/Xaw/Box.h \
-  /usr/include/X11/Xmu/Converters.h /usr/include/X11/Xaw/Command.h \
-  /usr/include/X11/Xaw/Label.h /usr/include/X11/Xaw/Simple.h \
-  /usr/include/X11/Xaw/Toggle.h /usr/include/X11/Xaw/Dialog.h \
-  /usr/include/X11/Xaw/Scrollbar.h /usr/include/X11/Xaw/Viewport.h \
-  /usr/include/X11/Xaw/Reports.h /usr/include/X11/Xaw/List.h \
-  /usr/include/X11/Xaw/AsciiText.h /usr/include/X11/Xaw/Text.h \
-  /usr/include/X11/Xaw/TextSink.h /usr/include/X11/Xaw/TextSrc.h \
-  /usr/include/X11/Xaw/AsciiSrc.h /usr/include/X11/Xaw/AsciiSink.h \
-  /usr/include/X11/Xaw/MultiSrc.h /usr/include/X11/Xaw/MenuButton.h \
-  /usr/include/X11/Xaw/SimpleMenu.h /usr/include/X11/Xaw/SmeBSB.h \
-  /usr/include/X11/Xaw/Sme.h /usr/include/X11/Xaw/SmeLine.h SciPlot.h \
-  /home/pierce/include/netcdf.h /usr/include/errno.h \
-  /usr/include/bits/errno.h /usr/include/linux/errno.h \
-  /usr/include/asm/errno.h /usr/include/asm-generic/errno.h \
-  /usr/include/asm-generic/errno-base.h ../config.h ncview.defines.h \
-  /home/pierce/include/udunits2.h /home/pierce/include/converter.h \
-  ncview.protos.h
-
-ncview.includes.h:
-
-/usr/include/stdio.h:
-
-/usr/include/features.h:
-
-/usr/include/sys/cdefs.h:
-
-/usr/include/bits/wordsize.h:
-
-/usr/include/gnu/stubs.h:
-
-/usr/include/gnu/stubs-64.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h:
-
-/usr/include/bits/types.h:
-
-/usr/include/bits/typesizes.h:
-
-/usr/include/libio.h:
-
-/usr/include/_G_config.h:
-
-/usr/include/wchar.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h:
-
-/usr/include/bits/stdio_lim.h:
-
-/usr/include/bits/sys_errlist.h:
-
-/usr/include/stdlib.h:
-
-/usr/include/sys/types.h:
-
-/usr/include/time.h:
-
-/usr/include/endian.h:
-
-/usr/include/bits/endian.h:
-
-/usr/include/sys/select.h:
-
-/usr/include/bits/select.h:
-
-/usr/include/bits/sigset.h:
-
-/usr/include/bits/time.h:
-
-/usr/include/sys/sysmacros.h:
-
-/usr/include/bits/pthreadtypes.h:
-
-/usr/include/alloca.h:
-
-/usr/include/dirent.h:
-
-/usr/include/bits/dirent.h:
-
-/usr/include/bits/posix1_lim.h:
-
-/usr/include/bits/local_lim.h:
-
-/usr/include/linux/limits.h:
-
-/usr/include/sys/stat.h:
-
-/usr/include/bits/stat.h:
-
-/usr/include/fcntl.h:
-
-/usr/include/bits/fcntl.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/limits.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/syslimits.h:
-
-/usr/include/limits.h:
-
-/usr/include/bits/posix2_lim.h:
-
-/usr/include/math.h:
-
-/usr/include/bits/huge_val.h:
-
-/usr/include/bits/mathdef.h:
-
-/usr/include/bits/mathcalls.h:
-
-/usr/include/unistd.h:
-
-/usr/include/bits/posix_opt.h:
-
-/usr/include/bits/confname.h:
-
-/usr/include/getopt.h:
-
-/usr/include/ctype.h:
-
-/usr/include/X11/Intrinsic.h:
-
-/usr/include/X11/Xlib.h:
-
-/usr/include/X11/X.h:
-
-/usr/include/X11/Xfuncproto.h:
-
-/usr/include/X11/Xosdefs.h:
-
-/usr/include/X11/Xutil.h:
-
-/usr/include/X11/keysym.h:
-
-/usr/include/X11/keysymdef.h:
-
-/usr/include/X11/Xresource.h:
-
-/usr/include/string.h:
-
-/usr/include/X11/Core.h:
-
-/usr/include/X11/Composite.h:
-
-/usr/include/X11/Constraint.h:
-
-/usr/include/X11/Object.h:
-
-/usr/include/X11/RectObj.h:
-
-/usr/include/X11/IntrinsicP.h:
-
-/usr/include/X11/CoreP.h:
-
-/usr/include/X11/CompositeP.h:
-
-/usr/include/X11/ConstrainP.h:
-
-/usr/include/X11/ObjectP.h:
-
-/usr/include/X11/RectObjP.h:
-
-/usr/include/X11/StringDefs.h:
-
-/usr/include/X11/cursorfont.h:
-
-/usr/include/X11/Shell.h:
-
-/usr/include/X11/SM/SMlib.h:
-
-/usr/include/X11/SM/SM.h:
-
-/usr/include/X11/ICE/ICElib.h:
-
-/usr/include/X11/ICE/ICE.h:
-
-/usr/include/X11/Xaw/Form.h:
-
-/usr/include/X11/Xaw/Box.h:
-
-/usr/include/X11/Xmu/Converters.h:
-
-/usr/include/X11/Xaw/Command.h:
-
-/usr/include/X11/Xaw/Label.h:
-
-/usr/include/X11/Xaw/Simple.h:
-
-/usr/include/X11/Xaw/Toggle.h:
-
-/usr/include/X11/Xaw/Dialog.h:
-
-/usr/include/X11/Xaw/Scrollbar.h:
-
-/usr/include/X11/Xaw/Viewport.h:
-
-/usr/include/X11/Xaw/Reports.h:
-
-/usr/include/X11/Xaw/List.h:
-
-/usr/include/X11/Xaw/AsciiText.h:
-
-/usr/include/X11/Xaw/Text.h:
-
-/usr/include/X11/Xaw/TextSink.h:
-
-/usr/include/X11/Xaw/TextSrc.h:
-
-/usr/include/X11/Xaw/AsciiSrc.h:
-
-/usr/include/X11/Xaw/AsciiSink.h:
-
-/usr/include/X11/Xaw/MultiSrc.h:
-
-/usr/include/X11/Xaw/MenuButton.h:
-
-/usr/include/X11/Xaw/SimpleMenu.h:
-
-/usr/include/X11/Xaw/SmeBSB.h:
-
-/usr/include/X11/Xaw/Sme.h:
-
-/usr/include/X11/Xaw/SmeLine.h:
-
-SciPlot.h:
-
-/home/pierce/include/netcdf.h:
-
-/usr/include/errno.h:
-
-/usr/include/bits/errno.h:
-
-/usr/include/linux/errno.h:
-
-/usr/include/asm/errno.h:
-
-/usr/include/asm-generic/errno.h:
-
-/usr/include/asm-generic/errno-base.h:
-
-../config.h:
-
-ncview.defines.h:
-
-/home/pierce/include/udunits2.h:
-
-/home/pierce/include/converter.h:
-
-ncview.protos.h:
diff --git a/src/.deps/file.Po b/src/.deps/file.Po
deleted file mode 100644
index 8ae5f26..0000000
--- a/src/.deps/file.Po
+++ /dev/null
@@ -1,287 +0,0 @@
-file.o file.o: file.c ncview.includes.h /usr/include/stdio.h \
-  /usr/include/features.h /usr/include/sys/cdefs.h \
-  /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
-  /usr/include/gnu/stubs-64.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h \
-  /usr/include/bits/types.h /usr/include/bits/typesizes.h \
-  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h \
-  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
-  /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
-  /usr/include/endian.h /usr/include/bits/endian.h \
-  /usr/include/sys/select.h /usr/include/bits/select.h \
-  /usr/include/bits/sigset.h /usr/include/bits/time.h \
-  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
-  /usr/include/alloca.h /usr/include/dirent.h /usr/include/bits/dirent.h \
-  /usr/include/bits/posix1_lim.h /usr/include/bits/local_lim.h \
-  /usr/include/linux/limits.h /usr/include/sys/stat.h \
-  /usr/include/bits/stat.h /usr/include/fcntl.h /usr/include/bits/fcntl.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/limits.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/syslimits.h \
-  /usr/include/limits.h /usr/include/bits/posix2_lim.h \
-  /usr/include/math.h /usr/include/bits/huge_val.h \
-  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
-  /usr/include/unistd.h /usr/include/bits/posix_opt.h \
-  /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/ctype.h \
-  /usr/include/X11/Intrinsic.h /usr/include/X11/Xlib.h \
-  /usr/include/X11/X.h /usr/include/X11/Xfuncproto.h \
-  /usr/include/X11/Xosdefs.h /usr/include/X11/Xutil.h \
-  /usr/include/X11/keysym.h /usr/include/X11/keysymdef.h \
-  /usr/include/X11/Xresource.h /usr/include/string.h \
-  /usr/include/X11/Core.h /usr/include/X11/Composite.h \
-  /usr/include/X11/Constraint.h /usr/include/X11/Object.h \
-  /usr/include/X11/RectObj.h /usr/include/X11/IntrinsicP.h \
-  /usr/include/X11/CoreP.h /usr/include/X11/CompositeP.h \
-  /usr/include/X11/ConstrainP.h /usr/include/X11/ObjectP.h \
-  /usr/include/X11/RectObjP.h /usr/include/X11/StringDefs.h \
-  /usr/include/X11/cursorfont.h /usr/include/X11/Shell.h \
-  /usr/include/X11/SM/SMlib.h /usr/include/X11/SM/SM.h \
-  /usr/include/X11/ICE/ICElib.h /usr/include/X11/ICE/ICE.h \
-  /usr/include/X11/Xaw/Form.h /usr/include/X11/Xaw/Box.h \
-  /usr/include/X11/Xmu/Converters.h /usr/include/X11/Xaw/Command.h \
-  /usr/include/X11/Xaw/Label.h /usr/include/X11/Xaw/Simple.h \
-  /usr/include/X11/Xaw/Toggle.h /usr/include/X11/Xaw/Dialog.h \
-  /usr/include/X11/Xaw/Scrollbar.h /usr/include/X11/Xaw/Viewport.h \
-  /usr/include/X11/Xaw/Reports.h /usr/include/X11/Xaw/List.h \
-  /usr/include/X11/Xaw/AsciiText.h /usr/include/X11/Xaw/Text.h \
-  /usr/include/X11/Xaw/TextSink.h /usr/include/X11/Xaw/TextSrc.h \
-  /usr/include/X11/Xaw/AsciiSrc.h /usr/include/X11/Xaw/AsciiSink.h \
-  /usr/include/X11/Xaw/MultiSrc.h /usr/include/X11/Xaw/MenuButton.h \
-  /usr/include/X11/Xaw/SimpleMenu.h /usr/include/X11/Xaw/SmeBSB.h \
-  /usr/include/X11/Xaw/Sme.h /usr/include/X11/Xaw/SmeLine.h SciPlot.h \
-  /home/pierce/include/netcdf.h /usr/include/errno.h \
-  /usr/include/bits/errno.h /usr/include/linux/errno.h \
-  /usr/include/asm/errno.h /usr/include/asm-generic/errno.h \
-  /usr/include/asm-generic/errno-base.h ../config.h ncview.defines.h \
-  /home/pierce/include/udunits2.h /home/pierce/include/converter.h \
-  ncview.protos.h
-
-ncview.includes.h:
-
-/usr/include/stdio.h:
-
-/usr/include/features.h:
-
-/usr/include/sys/cdefs.h:
-
-/usr/include/bits/wordsize.h:
-
-/usr/include/gnu/stubs.h:
-
-/usr/include/gnu/stubs-64.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h:
-
-/usr/include/bits/types.h:
-
-/usr/include/bits/typesizes.h:
-
-/usr/include/libio.h:
-
-/usr/include/_G_config.h:
-
-/usr/include/wchar.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h:
-
-/usr/include/bits/stdio_lim.h:
-
-/usr/include/bits/sys_errlist.h:
-
-/usr/include/stdlib.h:
-
-/usr/include/sys/types.h:
-
-/usr/include/time.h:
-
-/usr/include/endian.h:
-
-/usr/include/bits/endian.h:
-
-/usr/include/sys/select.h:
-
-/usr/include/bits/select.h:
-
-/usr/include/bits/sigset.h:
-
-/usr/include/bits/time.h:
-
-/usr/include/sys/sysmacros.h:
-
-/usr/include/bits/pthreadtypes.h:
-
-/usr/include/alloca.h:
-
-/usr/include/dirent.h:
-
-/usr/include/bits/dirent.h:
-
-/usr/include/bits/posix1_lim.h:
-
-/usr/include/bits/local_lim.h:
-
-/usr/include/linux/limits.h:
-
-/usr/include/sys/stat.h:
-
-/usr/include/bits/stat.h:
-
-/usr/include/fcntl.h:
-
-/usr/include/bits/fcntl.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/limits.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/syslimits.h:
-
-/usr/include/limits.h:
-
-/usr/include/bits/posix2_lim.h:
-
-/usr/include/math.h:
-
-/usr/include/bits/huge_val.h:
-
-/usr/include/bits/mathdef.h:
-
-/usr/include/bits/mathcalls.h:
-
-/usr/include/unistd.h:
-
-/usr/include/bits/posix_opt.h:
-
-/usr/include/bits/confname.h:
-
-/usr/include/getopt.h:
-
-/usr/include/ctype.h:
-
-/usr/include/X11/Intrinsic.h:
-
-/usr/include/X11/Xlib.h:
-
-/usr/include/X11/X.h:
-
-/usr/include/X11/Xfuncproto.h:
-
-/usr/include/X11/Xosdefs.h:
-
-/usr/include/X11/Xutil.h:
-
-/usr/include/X11/keysym.h:
-
-/usr/include/X11/keysymdef.h:
-
-/usr/include/X11/Xresource.h:
-
-/usr/include/string.h:
-
-/usr/include/X11/Core.h:
-
-/usr/include/X11/Composite.h:
-
-/usr/include/X11/Constraint.h:
-
-/usr/include/X11/Object.h:
-
-/usr/include/X11/RectObj.h:
-
-/usr/include/X11/IntrinsicP.h:
-
-/usr/include/X11/CoreP.h:
-
-/usr/include/X11/CompositeP.h:
-
-/usr/include/X11/ConstrainP.h:
-
-/usr/include/X11/ObjectP.h:
-
-/usr/include/X11/RectObjP.h:
-
-/usr/include/X11/StringDefs.h:
-
-/usr/include/X11/cursorfont.h:
-
-/usr/include/X11/Shell.h:
-
-/usr/include/X11/SM/SMlib.h:
-
-/usr/include/X11/SM/SM.h:
-
-/usr/include/X11/ICE/ICElib.h:
-
-/usr/include/X11/ICE/ICE.h:
-
-/usr/include/X11/Xaw/Form.h:
-
-/usr/include/X11/Xaw/Box.h:
-
-/usr/include/X11/Xmu/Converters.h:
-
-/usr/include/X11/Xaw/Command.h:
-
-/usr/include/X11/Xaw/Label.h:
-
-/usr/include/X11/Xaw/Simple.h:
-
-/usr/include/X11/Xaw/Toggle.h:
-
-/usr/include/X11/Xaw/Dialog.h:
-
-/usr/include/X11/Xaw/Scrollbar.h:
-
-/usr/include/X11/Xaw/Viewport.h:
-
-/usr/include/X11/Xaw/Reports.h:
-
-/usr/include/X11/Xaw/List.h:
-
-/usr/include/X11/Xaw/AsciiText.h:
-
-/usr/include/X11/Xaw/Text.h:
-
-/usr/include/X11/Xaw/TextSink.h:
-
-/usr/include/X11/Xaw/TextSrc.h:
-
-/usr/include/X11/Xaw/AsciiSrc.h:
-
-/usr/include/X11/Xaw/AsciiSink.h:
-
-/usr/include/X11/Xaw/MultiSrc.h:
-
-/usr/include/X11/Xaw/MenuButton.h:
-
-/usr/include/X11/Xaw/SimpleMenu.h:
-
-/usr/include/X11/Xaw/SmeBSB.h:
-
-/usr/include/X11/Xaw/Sme.h:
-
-/usr/include/X11/Xaw/SmeLine.h:
-
-SciPlot.h:
-
-/home/pierce/include/netcdf.h:
-
-/usr/include/errno.h:
-
-/usr/include/bits/errno.h:
-
-/usr/include/linux/errno.h:
-
-/usr/include/asm/errno.h:
-
-/usr/include/asm-generic/errno.h:
-
-/usr/include/asm-generic/errno-base.h:
-
-../config.h:
-
-ncview.defines.h:
-
-/home/pierce/include/udunits2.h:
-
-/home/pierce/include/converter.h:
-
-ncview.protos.h:
diff --git a/src/.deps/file_netcdf.Po b/src/.deps/file_netcdf.Po
deleted file mode 100644
index 6a25a5e..0000000
--- a/src/.deps/file_netcdf.Po
+++ /dev/null
@@ -1,287 +0,0 @@
-file_netcdf.o file_netcdf.o: file_netcdf.c ncview.includes.h \
-  /usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \
-  /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
-  /usr/include/gnu/stubs-64.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h \
-  /usr/include/bits/types.h /usr/include/bits/typesizes.h \
-  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h \
-  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
-  /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
-  /usr/include/endian.h /usr/include/bits/endian.h \
-  /usr/include/sys/select.h /usr/include/bits/select.h \
-  /usr/include/bits/sigset.h /usr/include/bits/time.h \
-  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
-  /usr/include/alloca.h /usr/include/dirent.h /usr/include/bits/dirent.h \
-  /usr/include/bits/posix1_lim.h /usr/include/bits/local_lim.h \
-  /usr/include/linux/limits.h /usr/include/sys/stat.h \
-  /usr/include/bits/stat.h /usr/include/fcntl.h /usr/include/bits/fcntl.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/limits.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/syslimits.h \
-  /usr/include/limits.h /usr/include/bits/posix2_lim.h \
-  /usr/include/math.h /usr/include/bits/huge_val.h \
-  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
-  /usr/include/unistd.h /usr/include/bits/posix_opt.h \
-  /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/ctype.h \
-  /usr/include/X11/Intrinsic.h /usr/include/X11/Xlib.h \
-  /usr/include/X11/X.h /usr/include/X11/Xfuncproto.h \
-  /usr/include/X11/Xosdefs.h /usr/include/X11/Xutil.h \
-  /usr/include/X11/keysym.h /usr/include/X11/keysymdef.h \
-  /usr/include/X11/Xresource.h /usr/include/string.h \
-  /usr/include/X11/Core.h /usr/include/X11/Composite.h \
-  /usr/include/X11/Constraint.h /usr/include/X11/Object.h \
-  /usr/include/X11/RectObj.h /usr/include/X11/IntrinsicP.h \
-  /usr/include/X11/CoreP.h /usr/include/X11/CompositeP.h \
-  /usr/include/X11/ConstrainP.h /usr/include/X11/ObjectP.h \
-  /usr/include/X11/RectObjP.h /usr/include/X11/StringDefs.h \
-  /usr/include/X11/cursorfont.h /usr/include/X11/Shell.h \
-  /usr/include/X11/SM/SMlib.h /usr/include/X11/SM/SM.h \
-  /usr/include/X11/ICE/ICElib.h /usr/include/X11/ICE/ICE.h \
-  /usr/include/X11/Xaw/Form.h /usr/include/X11/Xaw/Box.h \
-  /usr/include/X11/Xmu/Converters.h /usr/include/X11/Xaw/Command.h \
-  /usr/include/X11/Xaw/Label.h /usr/include/X11/Xaw/Simple.h \
-  /usr/include/X11/Xaw/Toggle.h /usr/include/X11/Xaw/Dialog.h \
-  /usr/include/X11/Xaw/Scrollbar.h /usr/include/X11/Xaw/Viewport.h \
-  /usr/include/X11/Xaw/Reports.h /usr/include/X11/Xaw/List.h \
-  /usr/include/X11/Xaw/AsciiText.h /usr/include/X11/Xaw/Text.h \
-  /usr/include/X11/Xaw/TextSink.h /usr/include/X11/Xaw/TextSrc.h \
-  /usr/include/X11/Xaw/AsciiSrc.h /usr/include/X11/Xaw/AsciiSink.h \
-  /usr/include/X11/Xaw/MultiSrc.h /usr/include/X11/Xaw/MenuButton.h \
-  /usr/include/X11/Xaw/SimpleMenu.h /usr/include/X11/Xaw/SmeBSB.h \
-  /usr/include/X11/Xaw/Sme.h /usr/include/X11/Xaw/SmeLine.h SciPlot.h \
-  /home/pierce/include/netcdf.h /usr/include/errno.h \
-  /usr/include/bits/errno.h /usr/include/linux/errno.h \
-  /usr/include/asm/errno.h /usr/include/asm-generic/errno.h \
-  /usr/include/asm-generic/errno-base.h ../config.h ncview.defines.h \
-  /home/pierce/include/udunits2.h /home/pierce/include/converter.h \
-  ncview.protos.h
-
-ncview.includes.h:
-
-/usr/include/stdio.h:
-
-/usr/include/features.h:
-
-/usr/include/sys/cdefs.h:
-
-/usr/include/bits/wordsize.h:
-
-/usr/include/gnu/stubs.h:
-
-/usr/include/gnu/stubs-64.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h:
-
-/usr/include/bits/types.h:
-
-/usr/include/bits/typesizes.h:
-
-/usr/include/libio.h:
-
-/usr/include/_G_config.h:
-
-/usr/include/wchar.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h:
-
-/usr/include/bits/stdio_lim.h:
-
-/usr/include/bits/sys_errlist.h:
-
-/usr/include/stdlib.h:
-
-/usr/include/sys/types.h:
-
-/usr/include/time.h:
-
-/usr/include/endian.h:
-
-/usr/include/bits/endian.h:
-
-/usr/include/sys/select.h:
-
-/usr/include/bits/select.h:
-
-/usr/include/bits/sigset.h:
-
-/usr/include/bits/time.h:
-
-/usr/include/sys/sysmacros.h:
-
-/usr/include/bits/pthreadtypes.h:
-
-/usr/include/alloca.h:
-
-/usr/include/dirent.h:
-
-/usr/include/bits/dirent.h:
-
-/usr/include/bits/posix1_lim.h:
-
-/usr/include/bits/local_lim.h:
-
-/usr/include/linux/limits.h:
-
-/usr/include/sys/stat.h:
-
-/usr/include/bits/stat.h:
-
-/usr/include/fcntl.h:
-
-/usr/include/bits/fcntl.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/limits.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/syslimits.h:
-
-/usr/include/limits.h:
-
-/usr/include/bits/posix2_lim.h:
-
-/usr/include/math.h:
-
-/usr/include/bits/huge_val.h:
-
-/usr/include/bits/mathdef.h:
-
-/usr/include/bits/mathcalls.h:
-
-/usr/include/unistd.h:
-
-/usr/include/bits/posix_opt.h:
-
-/usr/include/bits/confname.h:
-
-/usr/include/getopt.h:
-
-/usr/include/ctype.h:
-
-/usr/include/X11/Intrinsic.h:
-
-/usr/include/X11/Xlib.h:
-
-/usr/include/X11/X.h:
-
-/usr/include/X11/Xfuncproto.h:
-
-/usr/include/X11/Xosdefs.h:
-
-/usr/include/X11/Xutil.h:
-
-/usr/include/X11/keysym.h:
-
-/usr/include/X11/keysymdef.h:
-
-/usr/include/X11/Xresource.h:
-
-/usr/include/string.h:
-
-/usr/include/X11/Core.h:
-
-/usr/include/X11/Composite.h:
-
-/usr/include/X11/Constraint.h:
-
-/usr/include/X11/Object.h:
-
-/usr/include/X11/RectObj.h:
-
-/usr/include/X11/IntrinsicP.h:
-
-/usr/include/X11/CoreP.h:
-
-/usr/include/X11/CompositeP.h:
-
-/usr/include/X11/ConstrainP.h:
-
-/usr/include/X11/ObjectP.h:
-
-/usr/include/X11/RectObjP.h:
-
-/usr/include/X11/StringDefs.h:
-
-/usr/include/X11/cursorfont.h:
-
-/usr/include/X11/Shell.h:
-
-/usr/include/X11/SM/SMlib.h:
-
-/usr/include/X11/SM/SM.h:
-
-/usr/include/X11/ICE/ICElib.h:
-
-/usr/include/X11/ICE/ICE.h:
-
-/usr/include/X11/Xaw/Form.h:
-
-/usr/include/X11/Xaw/Box.h:
-
-/usr/include/X11/Xmu/Converters.h:
-
-/usr/include/X11/Xaw/Command.h:
-
-/usr/include/X11/Xaw/Label.h:
-
-/usr/include/X11/Xaw/Simple.h:
-
-/usr/include/X11/Xaw/Toggle.h:
-
-/usr/include/X11/Xaw/Dialog.h:
-
-/usr/include/X11/Xaw/Scrollbar.h:
-
-/usr/include/X11/Xaw/Viewport.h:
-
-/usr/include/X11/Xaw/Reports.h:
-
-/usr/include/X11/Xaw/List.h:
-
-/usr/include/X11/Xaw/AsciiText.h:
-
-/usr/include/X11/Xaw/Text.h:
-
-/usr/include/X11/Xaw/TextSink.h:
-
-/usr/include/X11/Xaw/TextSrc.h:
-
-/usr/include/X11/Xaw/AsciiSrc.h:
-
-/usr/include/X11/Xaw/AsciiSink.h:
-
-/usr/include/X11/Xaw/MultiSrc.h:
-
-/usr/include/X11/Xaw/MenuButton.h:
-
-/usr/include/X11/Xaw/SimpleMenu.h:
-
-/usr/include/X11/Xaw/SmeBSB.h:
-
-/usr/include/X11/Xaw/Sme.h:
-
-/usr/include/X11/Xaw/SmeLine.h:
-
-SciPlot.h:
-
-/home/pierce/include/netcdf.h:
-
-/usr/include/errno.h:
-
-/usr/include/bits/errno.h:
-
-/usr/include/linux/errno.h:
-
-/usr/include/asm/errno.h:
-
-/usr/include/asm-generic/errno.h:
-
-/usr/include/asm-generic/errno-base.h:
-
-../config.h:
-
-ncview.defines.h:
-
-/home/pierce/include/udunits2.h:
-
-/home/pierce/include/converter.h:
-
-ncview.protos.h:
diff --git a/src/.deps/filesel.Po b/src/.deps/filesel.Po
deleted file mode 100644
index 14ea745..0000000
--- a/src/.deps/filesel.Po
+++ /dev/null
@@ -1,288 +0,0 @@
-filesel.o filesel.o: interface/filesel.c interface/../ncview.includes.h \
-  /usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \
-  /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
-  /usr/include/gnu/stubs-64.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h \
-  /usr/include/bits/types.h /usr/include/bits/typesizes.h \
-  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h \
-  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
-  /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
-  /usr/include/endian.h /usr/include/bits/endian.h \
-  /usr/include/sys/select.h /usr/include/bits/select.h \
-  /usr/include/bits/sigset.h /usr/include/bits/time.h \
-  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
-  /usr/include/alloca.h /usr/include/dirent.h /usr/include/bits/dirent.h \
-  /usr/include/bits/posix1_lim.h /usr/include/bits/local_lim.h \
-  /usr/include/linux/limits.h /usr/include/sys/stat.h \
-  /usr/include/bits/stat.h /usr/include/fcntl.h /usr/include/bits/fcntl.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/limits.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/syslimits.h \
-  /usr/include/limits.h /usr/include/bits/posix2_lim.h \
-  /usr/include/math.h /usr/include/bits/huge_val.h \
-  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
-  /usr/include/unistd.h /usr/include/bits/posix_opt.h \
-  /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/ctype.h \
-  /usr/include/X11/Intrinsic.h /usr/include/X11/Xlib.h \
-  /usr/include/X11/X.h /usr/include/X11/Xfuncproto.h \
-  /usr/include/X11/Xosdefs.h /usr/include/X11/Xutil.h \
-  /usr/include/X11/keysym.h /usr/include/X11/keysymdef.h \
-  /usr/include/X11/Xresource.h /usr/include/string.h \
-  /usr/include/X11/Core.h /usr/include/X11/Composite.h \
-  /usr/include/X11/Constraint.h /usr/include/X11/Object.h \
-  /usr/include/X11/RectObj.h /usr/include/X11/IntrinsicP.h \
-  /usr/include/X11/CoreP.h /usr/include/X11/CompositeP.h \
-  /usr/include/X11/ConstrainP.h /usr/include/X11/ObjectP.h \
-  /usr/include/X11/RectObjP.h /usr/include/X11/StringDefs.h \
-  /usr/include/X11/cursorfont.h /usr/include/X11/Shell.h \
-  /usr/include/X11/SM/SMlib.h /usr/include/X11/SM/SM.h \
-  /usr/include/X11/ICE/ICElib.h /usr/include/X11/ICE/ICE.h \
-  /usr/include/X11/Xaw/Form.h /usr/include/X11/Xaw/Box.h \
-  /usr/include/X11/Xmu/Converters.h /usr/include/X11/Xaw/Command.h \
-  /usr/include/X11/Xaw/Label.h /usr/include/X11/Xaw/Simple.h \
-  /usr/include/X11/Xaw/Toggle.h /usr/include/X11/Xaw/Dialog.h \
-  /usr/include/X11/Xaw/Scrollbar.h /usr/include/X11/Xaw/Viewport.h \
-  /usr/include/X11/Xaw/Reports.h /usr/include/X11/Xaw/List.h \
-  /usr/include/X11/Xaw/AsciiText.h /usr/include/X11/Xaw/Text.h \
-  /usr/include/X11/Xaw/TextSink.h /usr/include/X11/Xaw/TextSrc.h \
-  /usr/include/X11/Xaw/AsciiSrc.h /usr/include/X11/Xaw/AsciiSink.h \
-  /usr/include/X11/Xaw/MultiSrc.h /usr/include/X11/Xaw/MenuButton.h \
-  /usr/include/X11/Xaw/SimpleMenu.h /usr/include/X11/Xaw/SmeBSB.h \
-  /usr/include/X11/Xaw/Sme.h /usr/include/X11/Xaw/SmeLine.h \
-  interface/../SciPlot.h /home/pierce/include/netcdf.h \
-  /usr/include/errno.h /usr/include/bits/errno.h \
-  /usr/include/linux/errno.h /usr/include/asm/errno.h \
-  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
-  interface/../../config.h interface/../ncview.defines.h \
-  /home/pierce/include/udunits2.h /home/pierce/include/converter.h \
-  interface/../ncview.protos.h
-
-interface/../ncview.includes.h:
-
-/usr/include/stdio.h:
-
-/usr/include/features.h:
-
-/usr/include/sys/cdefs.h:
-
-/usr/include/bits/wordsize.h:
-
-/usr/include/gnu/stubs.h:
-
-/usr/include/gnu/stubs-64.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h:
-
-/usr/include/bits/types.h:
-
-/usr/include/bits/typesizes.h:
-
-/usr/include/libio.h:
-
-/usr/include/_G_config.h:
-
-/usr/include/wchar.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h:
-
-/usr/include/bits/stdio_lim.h:
-
-/usr/include/bits/sys_errlist.h:
-
-/usr/include/stdlib.h:
-
-/usr/include/sys/types.h:
-
-/usr/include/time.h:
-
-/usr/include/endian.h:
-
-/usr/include/bits/endian.h:
-
-/usr/include/sys/select.h:
-
-/usr/include/bits/select.h:
-
-/usr/include/bits/sigset.h:
-
-/usr/include/bits/time.h:
-
-/usr/include/sys/sysmacros.h:
-
-/usr/include/bits/pthreadtypes.h:
-
-/usr/include/alloca.h:
-
-/usr/include/dirent.h:
-
-/usr/include/bits/dirent.h:
-
-/usr/include/bits/posix1_lim.h:
-
-/usr/include/bits/local_lim.h:
-
-/usr/include/linux/limits.h:
-
-/usr/include/sys/stat.h:
-
-/usr/include/bits/stat.h:
-
-/usr/include/fcntl.h:
-
-/usr/include/bits/fcntl.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/limits.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/syslimits.h:
-
-/usr/include/limits.h:
-
-/usr/include/bits/posix2_lim.h:
-
-/usr/include/math.h:
-
-/usr/include/bits/huge_val.h:
-
-/usr/include/bits/mathdef.h:
-
-/usr/include/bits/mathcalls.h:
-
-/usr/include/unistd.h:
-
-/usr/include/bits/posix_opt.h:
-
-/usr/include/bits/confname.h:
-
-/usr/include/getopt.h:
-
-/usr/include/ctype.h:
-
-/usr/include/X11/Intrinsic.h:
-
-/usr/include/X11/Xlib.h:
-
-/usr/include/X11/X.h:
-
-/usr/include/X11/Xfuncproto.h:
-
-/usr/include/X11/Xosdefs.h:
-
-/usr/include/X11/Xutil.h:
-
-/usr/include/X11/keysym.h:
-
-/usr/include/X11/keysymdef.h:
-
-/usr/include/X11/Xresource.h:
-
-/usr/include/string.h:
-
-/usr/include/X11/Core.h:
-
-/usr/include/X11/Composite.h:
-
-/usr/include/X11/Constraint.h:
-
-/usr/include/X11/Object.h:
-
-/usr/include/X11/RectObj.h:
-
-/usr/include/X11/IntrinsicP.h:
-
-/usr/include/X11/CoreP.h:
-
-/usr/include/X11/CompositeP.h:
-
-/usr/include/X11/ConstrainP.h:
-
-/usr/include/X11/ObjectP.h:
-
-/usr/include/X11/RectObjP.h:
-
-/usr/include/X11/StringDefs.h:
-
-/usr/include/X11/cursorfont.h:
-
-/usr/include/X11/Shell.h:
-
-/usr/include/X11/SM/SMlib.h:
-
-/usr/include/X11/SM/SM.h:
-
-/usr/include/X11/ICE/ICElib.h:
-
-/usr/include/X11/ICE/ICE.h:
-
-/usr/include/X11/Xaw/Form.h:
-
-/usr/include/X11/Xaw/Box.h:
-
-/usr/include/X11/Xmu/Converters.h:
-
-/usr/include/X11/Xaw/Command.h:
-
-/usr/include/X11/Xaw/Label.h:
-
-/usr/include/X11/Xaw/Simple.h:
-
-/usr/include/X11/Xaw/Toggle.h:
-
-/usr/include/X11/Xaw/Dialog.h:
-
-/usr/include/X11/Xaw/Scrollbar.h:
-
-/usr/include/X11/Xaw/Viewport.h:
-
-/usr/include/X11/Xaw/Reports.h:
-
-/usr/include/X11/Xaw/List.h:
-
-/usr/include/X11/Xaw/AsciiText.h:
-
-/usr/include/X11/Xaw/Text.h:
-
-/usr/include/X11/Xaw/TextSink.h:
-
-/usr/include/X11/Xaw/TextSrc.h:
-
-/usr/include/X11/Xaw/AsciiSrc.h:
-
-/usr/include/X11/Xaw/AsciiSink.h:
-
-/usr/include/X11/Xaw/MultiSrc.h:
-
-/usr/include/X11/Xaw/MenuButton.h:
-
-/usr/include/X11/Xaw/SimpleMenu.h:
-
-/usr/include/X11/Xaw/SmeBSB.h:
-
-/usr/include/X11/Xaw/Sme.h:
-
-/usr/include/X11/Xaw/SmeLine.h:
-
-interface/../SciPlot.h:
-
-/home/pierce/include/netcdf.h:
-
-/usr/include/errno.h:
-
-/usr/include/bits/errno.h:
-
-/usr/include/linux/errno.h:
-
-/usr/include/asm/errno.h:
-
-/usr/include/asm-generic/errno.h:
-
-/usr/include/asm-generic/errno-base.h:
-
-interface/../../config.h:
-
-interface/../ncview.defines.h:
-
-/home/pierce/include/udunits2.h:
-
-/home/pierce/include/converter.h:
-
-interface/../ncview.protos.h:
diff --git a/src/.deps/geteuid.Po b/src/.deps/geteuid.Po
deleted file mode 100644
index 5ee0bf4..0000000
--- a/src/.deps/geteuid.Po
+++ /dev/null
@@ -1,74 +0,0 @@
-geteuid.o geteuid.o: geteuid.c /usr/include/stdio.h \
-  /usr/include/features.h /usr/include/sys/cdefs.h \
-  /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
-  /usr/include/gnu/stubs-64.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h \
-  /usr/include/bits/types.h /usr/include/bits/typesizes.h \
-  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h \
-  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
-  /usr/include/sys/types.h /usr/include/time.h /usr/include/endian.h \
-  /usr/include/bits/endian.h /usr/include/sys/select.h \
-  /usr/include/bits/select.h /usr/include/bits/sigset.h \
-  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
-  /usr/include/bits/pthreadtypes.h /usr/include/unistd.h \
-  /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \
-  /usr/include/getopt.h
-
-/usr/include/stdio.h:
-
-/usr/include/features.h:
-
-/usr/include/sys/cdefs.h:
-
-/usr/include/bits/wordsize.h:
-
-/usr/include/gnu/stubs.h:
-
-/usr/include/gnu/stubs-64.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h:
-
-/usr/include/bits/types.h:
-
-/usr/include/bits/typesizes.h:
-
-/usr/include/libio.h:
-
-/usr/include/_G_config.h:
-
-/usr/include/wchar.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h:
-
-/usr/include/bits/stdio_lim.h:
-
-/usr/include/bits/sys_errlist.h:
-
-/usr/include/sys/types.h:
-
-/usr/include/time.h:
-
-/usr/include/endian.h:
-
-/usr/include/bits/endian.h:
-
-/usr/include/sys/select.h:
-
-/usr/include/bits/select.h:
-
-/usr/include/bits/sigset.h:
-
-/usr/include/bits/time.h:
-
-/usr/include/sys/sysmacros.h:
-
-/usr/include/bits/pthreadtypes.h:
-
-/usr/include/unistd.h:
-
-/usr/include/bits/posix_opt.h:
-
-/usr/include/bits/confname.h:
-
-/usr/include/getopt.h:
diff --git a/src/.deps/interface.Po b/src/.deps/interface.Po
deleted file mode 100644
index bf118a9..0000000
--- a/src/.deps/interface.Po
+++ /dev/null
@@ -1,289 +0,0 @@
-interface.o interface.o: interface/interface.c \
-  interface/../ncview.includes.h /usr/include/stdio.h \
-  /usr/include/features.h /usr/include/sys/cdefs.h \
-  /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
-  /usr/include/gnu/stubs-64.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h \
-  /usr/include/bits/types.h /usr/include/bits/typesizes.h \
-  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h \
-  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
-  /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
-  /usr/include/endian.h /usr/include/bits/endian.h \
-  /usr/include/sys/select.h /usr/include/bits/select.h \
-  /usr/include/bits/sigset.h /usr/include/bits/time.h \
-  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
-  /usr/include/alloca.h /usr/include/dirent.h /usr/include/bits/dirent.h \
-  /usr/include/bits/posix1_lim.h /usr/include/bits/local_lim.h \
-  /usr/include/linux/limits.h /usr/include/sys/stat.h \
-  /usr/include/bits/stat.h /usr/include/fcntl.h /usr/include/bits/fcntl.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/limits.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/syslimits.h \
-  /usr/include/limits.h /usr/include/bits/posix2_lim.h \
-  /usr/include/math.h /usr/include/bits/huge_val.h \
-  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
-  /usr/include/unistd.h /usr/include/bits/posix_opt.h \
-  /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/ctype.h \
-  /usr/include/X11/Intrinsic.h /usr/include/X11/Xlib.h \
-  /usr/include/X11/X.h /usr/include/X11/Xfuncproto.h \
-  /usr/include/X11/Xosdefs.h /usr/include/X11/Xutil.h \
-  /usr/include/X11/keysym.h /usr/include/X11/keysymdef.h \
-  /usr/include/X11/Xresource.h /usr/include/string.h \
-  /usr/include/X11/Core.h /usr/include/X11/Composite.h \
-  /usr/include/X11/Constraint.h /usr/include/X11/Object.h \
-  /usr/include/X11/RectObj.h /usr/include/X11/IntrinsicP.h \
-  /usr/include/X11/CoreP.h /usr/include/X11/CompositeP.h \
-  /usr/include/X11/ConstrainP.h /usr/include/X11/ObjectP.h \
-  /usr/include/X11/RectObjP.h /usr/include/X11/StringDefs.h \
-  /usr/include/X11/cursorfont.h /usr/include/X11/Shell.h \
-  /usr/include/X11/SM/SMlib.h /usr/include/X11/SM/SM.h \
-  /usr/include/X11/ICE/ICElib.h /usr/include/X11/ICE/ICE.h \
-  /usr/include/X11/Xaw/Form.h /usr/include/X11/Xaw/Box.h \
-  /usr/include/X11/Xmu/Converters.h /usr/include/X11/Xaw/Command.h \
-  /usr/include/X11/Xaw/Label.h /usr/include/X11/Xaw/Simple.h \
-  /usr/include/X11/Xaw/Toggle.h /usr/include/X11/Xaw/Dialog.h \
-  /usr/include/X11/Xaw/Scrollbar.h /usr/include/X11/Xaw/Viewport.h \
-  /usr/include/X11/Xaw/Reports.h /usr/include/X11/Xaw/List.h \
-  /usr/include/X11/Xaw/AsciiText.h /usr/include/X11/Xaw/Text.h \
-  /usr/include/X11/Xaw/TextSink.h /usr/include/X11/Xaw/TextSrc.h \
-  /usr/include/X11/Xaw/AsciiSrc.h /usr/include/X11/Xaw/AsciiSink.h \
-  /usr/include/X11/Xaw/MultiSrc.h /usr/include/X11/Xaw/MenuButton.h \
-  /usr/include/X11/Xaw/SimpleMenu.h /usr/include/X11/Xaw/SmeBSB.h \
-  /usr/include/X11/Xaw/Sme.h /usr/include/X11/Xaw/SmeLine.h \
-  interface/../SciPlot.h /home/pierce/include/netcdf.h \
-  /usr/include/errno.h /usr/include/bits/errno.h \
-  /usr/include/linux/errno.h /usr/include/asm/errno.h \
-  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
-  interface/../../config.h interface/../ncview.defines.h \
-  /home/pierce/include/udunits2.h /home/pierce/include/converter.h \
-  interface/../ncview.protos.h
-
-interface/../ncview.includes.h:
-
-/usr/include/stdio.h:
-
-/usr/include/features.h:
-
-/usr/include/sys/cdefs.h:
-
-/usr/include/bits/wordsize.h:
-
-/usr/include/gnu/stubs.h:
-
-/usr/include/gnu/stubs-64.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h:
-
-/usr/include/bits/types.h:
-
-/usr/include/bits/typesizes.h:
-
-/usr/include/libio.h:
-
-/usr/include/_G_config.h:
-
-/usr/include/wchar.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h:
-
-/usr/include/bits/stdio_lim.h:
-
-/usr/include/bits/sys_errlist.h:
-
-/usr/include/stdlib.h:
-
-/usr/include/sys/types.h:
-
-/usr/include/time.h:
-
-/usr/include/endian.h:
-
-/usr/include/bits/endian.h:
-
-/usr/include/sys/select.h:
-
-/usr/include/bits/select.h:
-
-/usr/include/bits/sigset.h:
-
-/usr/include/bits/time.h:
-
-/usr/include/sys/sysmacros.h:
-
-/usr/include/bits/pthreadtypes.h:
-
-/usr/include/alloca.h:
-
-/usr/include/dirent.h:
-
-/usr/include/bits/dirent.h:
-
-/usr/include/bits/posix1_lim.h:
-
-/usr/include/bits/local_lim.h:
-
-/usr/include/linux/limits.h:
-
-/usr/include/sys/stat.h:
-
-/usr/include/bits/stat.h:
-
-/usr/include/fcntl.h:
-
-/usr/include/bits/fcntl.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/limits.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/syslimits.h:
-
-/usr/include/limits.h:
-
-/usr/include/bits/posix2_lim.h:
-
-/usr/include/math.h:
-
-/usr/include/bits/huge_val.h:
-
-/usr/include/bits/mathdef.h:
-
-/usr/include/bits/mathcalls.h:
-
-/usr/include/unistd.h:
-
-/usr/include/bits/posix_opt.h:
-
-/usr/include/bits/confname.h:
-
-/usr/include/getopt.h:
-
-/usr/include/ctype.h:
-
-/usr/include/X11/Intrinsic.h:
-
-/usr/include/X11/Xlib.h:
-
-/usr/include/X11/X.h:
-
-/usr/include/X11/Xfuncproto.h:
-
-/usr/include/X11/Xosdefs.h:
-
-/usr/include/X11/Xutil.h:
-
-/usr/include/X11/keysym.h:
-
-/usr/include/X11/keysymdef.h:
-
-/usr/include/X11/Xresource.h:
-
-/usr/include/string.h:
-
-/usr/include/X11/Core.h:
-
-/usr/include/X11/Composite.h:
-
-/usr/include/X11/Constraint.h:
-
-/usr/include/X11/Object.h:
-
-/usr/include/X11/RectObj.h:
-
-/usr/include/X11/IntrinsicP.h:
-
-/usr/include/X11/CoreP.h:
-
-/usr/include/X11/CompositeP.h:
-
-/usr/include/X11/ConstrainP.h:
-
-/usr/include/X11/ObjectP.h:
-
-/usr/include/X11/RectObjP.h:
-
-/usr/include/X11/StringDefs.h:
-
-/usr/include/X11/cursorfont.h:
-
-/usr/include/X11/Shell.h:
-
-/usr/include/X11/SM/SMlib.h:
-
-/usr/include/X11/SM/SM.h:
-
-/usr/include/X11/ICE/ICElib.h:
-
-/usr/include/X11/ICE/ICE.h:
-
-/usr/include/X11/Xaw/Form.h:
-
-/usr/include/X11/Xaw/Box.h:
-
-/usr/include/X11/Xmu/Converters.h:
-
-/usr/include/X11/Xaw/Command.h:
-
-/usr/include/X11/Xaw/Label.h:
-
-/usr/include/X11/Xaw/Simple.h:
-
-/usr/include/X11/Xaw/Toggle.h:
-
-/usr/include/X11/Xaw/Dialog.h:
-
-/usr/include/X11/Xaw/Scrollbar.h:
-
-/usr/include/X11/Xaw/Viewport.h:
-
-/usr/include/X11/Xaw/Reports.h:
-
-/usr/include/X11/Xaw/List.h:
-
-/usr/include/X11/Xaw/AsciiText.h:
-
-/usr/include/X11/Xaw/Text.h:
-
-/usr/include/X11/Xaw/TextSink.h:
-
-/usr/include/X11/Xaw/TextSrc.h:
-
-/usr/include/X11/Xaw/AsciiSrc.h:
-
-/usr/include/X11/Xaw/AsciiSink.h:
-
-/usr/include/X11/Xaw/MultiSrc.h:
-
-/usr/include/X11/Xaw/MenuButton.h:
-
-/usr/include/X11/Xaw/SimpleMenu.h:
-
-/usr/include/X11/Xaw/SmeBSB.h:
-
-/usr/include/X11/Xaw/Sme.h:
-
-/usr/include/X11/Xaw/SmeLine.h:
-
-interface/../SciPlot.h:
-
-/home/pierce/include/netcdf.h:
-
-/usr/include/errno.h:
-
-/usr/include/bits/errno.h:
-
-/usr/include/linux/errno.h:
-
-/usr/include/asm/errno.h:
-
-/usr/include/asm-generic/errno.h:
-
-/usr/include/asm-generic/errno-base.h:
-
-interface/../../config.h:
-
-interface/../ncview.defines.h:
-
-/home/pierce/include/udunits2.h:
-
-/home/pierce/include/converter.h:
-
-interface/../ncview.protos.h:
diff --git a/src/.deps/ncview.Po b/src/.deps/ncview.Po
deleted file mode 100644
index 8d088fc..0000000
--- a/src/.deps/ncview.Po
+++ /dev/null
@@ -1,310 +0,0 @@
-ncview.o ncview.o: ncview.c ncview.includes.h /usr/include/stdio.h \
-  /usr/include/features.h /usr/include/sys/cdefs.h \
-  /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
-  /usr/include/gnu/stubs-64.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h \
-  /usr/include/bits/types.h /usr/include/bits/typesizes.h \
-  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h \
-  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
-  /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
-  /usr/include/endian.h /usr/include/bits/endian.h \
-  /usr/include/sys/select.h /usr/include/bits/select.h \
-  /usr/include/bits/sigset.h /usr/include/bits/time.h \
-  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
-  /usr/include/alloca.h /usr/include/dirent.h /usr/include/bits/dirent.h \
-  /usr/include/bits/posix1_lim.h /usr/include/bits/local_lim.h \
-  /usr/include/linux/limits.h /usr/include/sys/stat.h \
-  /usr/include/bits/stat.h /usr/include/fcntl.h /usr/include/bits/fcntl.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/limits.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/syslimits.h \
-  /usr/include/limits.h /usr/include/bits/posix2_lim.h \
-  /usr/include/math.h /usr/include/bits/huge_val.h \
-  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
-  /usr/include/unistd.h /usr/include/bits/posix_opt.h \
-  /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/ctype.h \
-  /usr/include/X11/Intrinsic.h /usr/include/X11/Xlib.h \
-  /usr/include/X11/X.h /usr/include/X11/Xfuncproto.h \
-  /usr/include/X11/Xosdefs.h /usr/include/X11/Xutil.h \
-  /usr/include/X11/keysym.h /usr/include/X11/keysymdef.h \
-  /usr/include/X11/Xresource.h /usr/include/string.h \
-  /usr/include/X11/Core.h /usr/include/X11/Composite.h \
-  /usr/include/X11/Constraint.h /usr/include/X11/Object.h \
-  /usr/include/X11/RectObj.h /usr/include/X11/IntrinsicP.h \
-  /usr/include/X11/CoreP.h /usr/include/X11/CompositeP.h \
-  /usr/include/X11/ConstrainP.h /usr/include/X11/ObjectP.h \
-  /usr/include/X11/RectObjP.h /usr/include/X11/StringDefs.h \
-  /usr/include/X11/cursorfont.h /usr/include/X11/Shell.h \
-  /usr/include/X11/SM/SMlib.h /usr/include/X11/SM/SM.h \
-  /usr/include/X11/ICE/ICElib.h /usr/include/X11/ICE/ICE.h \
-  /usr/include/X11/Xaw/Form.h /usr/include/X11/Xaw/Box.h \
-  /usr/include/X11/Xmu/Converters.h /usr/include/X11/Xaw/Command.h \
-  /usr/include/X11/Xaw/Label.h /usr/include/X11/Xaw/Simple.h \
-  /usr/include/X11/Xaw/Toggle.h /usr/include/X11/Xaw/Dialog.h \
-  /usr/include/X11/Xaw/Scrollbar.h /usr/include/X11/Xaw/Viewport.h \
-  /usr/include/X11/Xaw/Reports.h /usr/include/X11/Xaw/List.h \
-  /usr/include/X11/Xaw/AsciiText.h /usr/include/X11/Xaw/Text.h \
-  /usr/include/X11/Xaw/TextSink.h /usr/include/X11/Xaw/TextSrc.h \
-  /usr/include/X11/Xaw/AsciiSrc.h /usr/include/X11/Xaw/AsciiSink.h \
-  /usr/include/X11/Xaw/MultiSrc.h /usr/include/X11/Xaw/MenuButton.h \
-  /usr/include/X11/Xaw/SimpleMenu.h /usr/include/X11/Xaw/SmeBSB.h \
-  /usr/include/X11/Xaw/Sme.h /usr/include/X11/Xaw/SmeLine.h SciPlot.h \
-  /home/pierce/include/netcdf.h /usr/include/errno.h \
-  /usr/include/bits/errno.h /usr/include/linux/errno.h \
-  /usr/include/asm/errno.h /usr/include/asm-generic/errno.h \
-  /usr/include/asm-generic/errno-base.h ../config.h ncview.defines.h \
-  /home/pierce/include/udunits2.h /home/pierce/include/converter.h \
-  ncview.protos.h colormaps_3gauss.h colormaps_3saw.h colormaps_bw.h \
-  colormaps_default.h colormaps_detail.h colormaps_extrema.h \
-  colormaps_helix.h colormaps_helix2.h colormaps_hotres.h \
-  colormaps_ssec.h
-
-ncview.includes.h:
-
-/usr/include/stdio.h:
-
-/usr/include/features.h:
-
-/usr/include/sys/cdefs.h:
-
-/usr/include/bits/wordsize.h:
-
-/usr/include/gnu/stubs.h:
-
-/usr/include/gnu/stubs-64.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h:
-
-/usr/include/bits/types.h:
-
-/usr/include/bits/typesizes.h:
-
-/usr/include/libio.h:
-
-/usr/include/_G_config.h:
-
-/usr/include/wchar.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h:
-
-/usr/include/bits/stdio_lim.h:
-
-/usr/include/bits/sys_errlist.h:
-
-/usr/include/stdlib.h:
-
-/usr/include/sys/types.h:
-
-/usr/include/time.h:
-
-/usr/include/endian.h:
-
-/usr/include/bits/endian.h:
-
-/usr/include/sys/select.h:
-
-/usr/include/bits/select.h:
-
-/usr/include/bits/sigset.h:
-
-/usr/include/bits/time.h:
-
-/usr/include/sys/sysmacros.h:
-
-/usr/include/bits/pthreadtypes.h:
-
-/usr/include/alloca.h:
-
-/usr/include/dirent.h:
-
-/usr/include/bits/dirent.h:
-
-/usr/include/bits/posix1_lim.h:
-
-/usr/include/bits/local_lim.h:
-
-/usr/include/linux/limits.h:
-
-/usr/include/sys/stat.h:
-
-/usr/include/bits/stat.h:
-
-/usr/include/fcntl.h:
-
-/usr/include/bits/fcntl.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/limits.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/syslimits.h:
-
-/usr/include/limits.h:
-
-/usr/include/bits/posix2_lim.h:
-
-/usr/include/math.h:
-
-/usr/include/bits/huge_val.h:
-
-/usr/include/bits/mathdef.h:
-
-/usr/include/bits/mathcalls.h:
-
-/usr/include/unistd.h:
-
-/usr/include/bits/posix_opt.h:
-
-/usr/include/bits/confname.h:
-
-/usr/include/getopt.h:
-
-/usr/include/ctype.h:
-
-/usr/include/X11/Intrinsic.h:
-
-/usr/include/X11/Xlib.h:
-
-/usr/include/X11/X.h:
-
-/usr/include/X11/Xfuncproto.h:
-
-/usr/include/X11/Xosdefs.h:
-
-/usr/include/X11/Xutil.h:
-
-/usr/include/X11/keysym.h:
-
-/usr/include/X11/keysymdef.h:
-
-/usr/include/X11/Xresource.h:
-
-/usr/include/string.h:
-
-/usr/include/X11/Core.h:
-
-/usr/include/X11/Composite.h:
-
-/usr/include/X11/Constraint.h:
-
-/usr/include/X11/Object.h:
-
-/usr/include/X11/RectObj.h:
-
-/usr/include/X11/IntrinsicP.h:
-
-/usr/include/X11/CoreP.h:
-
-/usr/include/X11/CompositeP.h:
-
-/usr/include/X11/ConstrainP.h:
-
-/usr/include/X11/ObjectP.h:
-
-/usr/include/X11/RectObjP.h:
-
-/usr/include/X11/StringDefs.h:
-
-/usr/include/X11/cursorfont.h:
-
-/usr/include/X11/Shell.h:
-
-/usr/include/X11/SM/SMlib.h:
-
-/usr/include/X11/SM/SM.h:
-
-/usr/include/X11/ICE/ICElib.h:
-
-/usr/include/X11/ICE/ICE.h:
-
-/usr/include/X11/Xaw/Form.h:
-
-/usr/include/X11/Xaw/Box.h:
-
-/usr/include/X11/Xmu/Converters.h:
-
-/usr/include/X11/Xaw/Command.h:
-
-/usr/include/X11/Xaw/Label.h:
-
-/usr/include/X11/Xaw/Simple.h:
-
-/usr/include/X11/Xaw/Toggle.h:
-
-/usr/include/X11/Xaw/Dialog.h:
-
-/usr/include/X11/Xaw/Scrollbar.h:
-
-/usr/include/X11/Xaw/Viewport.h:
-
-/usr/include/X11/Xaw/Reports.h:
-
-/usr/include/X11/Xaw/List.h:
-
-/usr/include/X11/Xaw/AsciiText.h:
-
-/usr/include/X11/Xaw/Text.h:
-
-/usr/include/X11/Xaw/TextSink.h:
-
-/usr/include/X11/Xaw/TextSrc.h:
-
-/usr/include/X11/Xaw/AsciiSrc.h:
-
-/usr/include/X11/Xaw/AsciiSink.h:
-
-/usr/include/X11/Xaw/MultiSrc.h:
-
-/usr/include/X11/Xaw/MenuButton.h:
-
-/usr/include/X11/Xaw/SimpleMenu.h:
-
-/usr/include/X11/Xaw/SmeBSB.h:
-
-/usr/include/X11/Xaw/Sme.h:
-
-/usr/include/X11/Xaw/SmeLine.h:
-
-SciPlot.h:
-
-/home/pierce/include/netcdf.h:
-
-/usr/include/errno.h:
-
-/usr/include/bits/errno.h:
-
-/usr/include/linux/errno.h:
-
-/usr/include/asm/errno.h:
-
-/usr/include/asm-generic/errno.h:
-
-/usr/include/asm-generic/errno-base.h:
-
-../config.h:
-
-ncview.defines.h:
-
-/home/pierce/include/udunits2.h:
-
-/home/pierce/include/converter.h:
-
-ncview.protos.h:
-
-colormaps_3gauss.h:
-
-colormaps_3saw.h:
-
-colormaps_bw.h:
-
-colormaps_default.h:
-
-colormaps_detail.h:
-
-colormaps_extrema.h:
-
-colormaps_helix.h:
-
-colormaps_helix2.h:
-
-colormaps_hotres.h:
-
-colormaps_ssec.h:
diff --git a/src/.deps/overlay.Po b/src/.deps/overlay.Po
deleted file mode 100644
index cd9962e..0000000
--- a/src/.deps/overlay.Po
+++ /dev/null
@@ -1,294 +0,0 @@
-overlay.o overlay.o: overlay.c ncview.includes.h /usr/include/stdio.h \
-  /usr/include/features.h /usr/include/sys/cdefs.h \
-  /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
-  /usr/include/gnu/stubs-64.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h \
-  /usr/include/bits/types.h /usr/include/bits/typesizes.h \
-  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h \
-  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
-  /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
-  /usr/include/endian.h /usr/include/bits/endian.h \
-  /usr/include/sys/select.h /usr/include/bits/select.h \
-  /usr/include/bits/sigset.h /usr/include/bits/time.h \
-  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
-  /usr/include/alloca.h /usr/include/dirent.h /usr/include/bits/dirent.h \
-  /usr/include/bits/posix1_lim.h /usr/include/bits/local_lim.h \
-  /usr/include/linux/limits.h /usr/include/sys/stat.h \
-  /usr/include/bits/stat.h /usr/include/fcntl.h /usr/include/bits/fcntl.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/limits.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/syslimits.h \
-  /usr/include/limits.h /usr/include/bits/posix2_lim.h \
-  /usr/include/math.h /usr/include/bits/huge_val.h \
-  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
-  /usr/include/unistd.h /usr/include/bits/posix_opt.h \
-  /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/ctype.h \
-  /usr/include/X11/Intrinsic.h /usr/include/X11/Xlib.h \
-  /usr/include/X11/X.h /usr/include/X11/Xfuncproto.h \
-  /usr/include/X11/Xosdefs.h /usr/include/X11/Xutil.h \
-  /usr/include/X11/keysym.h /usr/include/X11/keysymdef.h \
-  /usr/include/X11/Xresource.h /usr/include/string.h \
-  /usr/include/X11/Core.h /usr/include/X11/Composite.h \
-  /usr/include/X11/Constraint.h /usr/include/X11/Object.h \
-  /usr/include/X11/RectObj.h /usr/include/X11/IntrinsicP.h \
-  /usr/include/X11/CoreP.h /usr/include/X11/CompositeP.h \
-  /usr/include/X11/ConstrainP.h /usr/include/X11/ObjectP.h \
-  /usr/include/X11/RectObjP.h /usr/include/X11/StringDefs.h \
-  /usr/include/X11/cursorfont.h /usr/include/X11/Shell.h \
-  /usr/include/X11/SM/SMlib.h /usr/include/X11/SM/SM.h \
-  /usr/include/X11/ICE/ICElib.h /usr/include/X11/ICE/ICE.h \
-  /usr/include/X11/Xaw/Form.h /usr/include/X11/Xaw/Box.h \
-  /usr/include/X11/Xmu/Converters.h /usr/include/X11/Xaw/Command.h \
-  /usr/include/X11/Xaw/Label.h /usr/include/X11/Xaw/Simple.h \
-  /usr/include/X11/Xaw/Toggle.h /usr/include/X11/Xaw/Dialog.h \
-  /usr/include/X11/Xaw/Scrollbar.h /usr/include/X11/Xaw/Viewport.h \
-  /usr/include/X11/Xaw/Reports.h /usr/include/X11/Xaw/List.h \
-  /usr/include/X11/Xaw/AsciiText.h /usr/include/X11/Xaw/Text.h \
-  /usr/include/X11/Xaw/TextSink.h /usr/include/X11/Xaw/TextSrc.h \
-  /usr/include/X11/Xaw/AsciiSrc.h /usr/include/X11/Xaw/AsciiSink.h \
-  /usr/include/X11/Xaw/MultiSrc.h /usr/include/X11/Xaw/MenuButton.h \
-  /usr/include/X11/Xaw/SimpleMenu.h /usr/include/X11/Xaw/SmeBSB.h \
-  /usr/include/X11/Xaw/Sme.h /usr/include/X11/Xaw/SmeLine.h SciPlot.h \
-  /home/pierce/include/netcdf.h /usr/include/errno.h \
-  /usr/include/bits/errno.h /usr/include/linux/errno.h \
-  /usr/include/asm/errno.h /usr/include/asm-generic/errno.h \
-  /usr/include/asm-generic/errno-base.h ../config.h ncview.defines.h \
-  /home/pierce/include/udunits2.h /home/pierce/include/converter.h \
-  ncview.protos.h overlay_coasts_p08deg.h overlay_coasts_p8deg.h \
-  overlay_usa.h
-
-ncview.includes.h:
-
-/usr/include/stdio.h:
-
-/usr/include/features.h:
-
-/usr/include/sys/cdefs.h:
-
-/usr/include/bits/wordsize.h:
-
-/usr/include/gnu/stubs.h:
-
-/usr/include/gnu/stubs-64.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h:
-
-/usr/include/bits/types.h:
-
-/usr/include/bits/typesizes.h:
-
-/usr/include/libio.h:
-
-/usr/include/_G_config.h:
-
-/usr/include/wchar.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h:
-
-/usr/include/bits/stdio_lim.h:
-
-/usr/include/bits/sys_errlist.h:
-
-/usr/include/stdlib.h:
-
-/usr/include/sys/types.h:
-
-/usr/include/time.h:
-
-/usr/include/endian.h:
-
-/usr/include/bits/endian.h:
-
-/usr/include/sys/select.h:
-
-/usr/include/bits/select.h:
-
-/usr/include/bits/sigset.h:
-
-/usr/include/bits/time.h:
-
-/usr/include/sys/sysmacros.h:
-
-/usr/include/bits/pthreadtypes.h:
-
-/usr/include/alloca.h:
-
-/usr/include/dirent.h:
-
-/usr/include/bits/dirent.h:
-
-/usr/include/bits/posix1_lim.h:
-
-/usr/include/bits/local_lim.h:
-
-/usr/include/linux/limits.h:
-
-/usr/include/sys/stat.h:
-
-/usr/include/bits/stat.h:
-
-/usr/include/fcntl.h:
-
-/usr/include/bits/fcntl.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/limits.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/syslimits.h:
-
-/usr/include/limits.h:
-
-/usr/include/bits/posix2_lim.h:
-
-/usr/include/math.h:
-
-/usr/include/bits/huge_val.h:
-
-/usr/include/bits/mathdef.h:
-
-/usr/include/bits/mathcalls.h:
-
-/usr/include/unistd.h:
-
-/usr/include/bits/posix_opt.h:
-
-/usr/include/bits/confname.h:
-
-/usr/include/getopt.h:
-
-/usr/include/ctype.h:
-
-/usr/include/X11/Intrinsic.h:
-
-/usr/include/X11/Xlib.h:
-
-/usr/include/X11/X.h:
-
-/usr/include/X11/Xfuncproto.h:
-
-/usr/include/X11/Xosdefs.h:
-
-/usr/include/X11/Xutil.h:
-
-/usr/include/X11/keysym.h:
-
-/usr/include/X11/keysymdef.h:
-
-/usr/include/X11/Xresource.h:
-
-/usr/include/string.h:
-
-/usr/include/X11/Core.h:
-
-/usr/include/X11/Composite.h:
-
-/usr/include/X11/Constraint.h:
-
-/usr/include/X11/Object.h:
-
-/usr/include/X11/RectObj.h:
-
-/usr/include/X11/IntrinsicP.h:
-
-/usr/include/X11/CoreP.h:
-
-/usr/include/X11/CompositeP.h:
-
-/usr/include/X11/ConstrainP.h:
-
-/usr/include/X11/ObjectP.h:
-
-/usr/include/X11/RectObjP.h:
-
-/usr/include/X11/StringDefs.h:
-
-/usr/include/X11/cursorfont.h:
-
-/usr/include/X11/Shell.h:
-
-/usr/include/X11/SM/SMlib.h:
-
-/usr/include/X11/SM/SM.h:
-
-/usr/include/X11/ICE/ICElib.h:
-
-/usr/include/X11/ICE/ICE.h:
-
-/usr/include/X11/Xaw/Form.h:
-
-/usr/include/X11/Xaw/Box.h:
-
-/usr/include/X11/Xmu/Converters.h:
-
-/usr/include/X11/Xaw/Command.h:
-
-/usr/include/X11/Xaw/Label.h:
-
-/usr/include/X11/Xaw/Simple.h:
-
-/usr/include/X11/Xaw/Toggle.h:
-
-/usr/include/X11/Xaw/Dialog.h:
-
-/usr/include/X11/Xaw/Scrollbar.h:
-
-/usr/include/X11/Xaw/Viewport.h:
-
-/usr/include/X11/Xaw/Reports.h:
-
-/usr/include/X11/Xaw/List.h:
-
-/usr/include/X11/Xaw/AsciiText.h:
-
-/usr/include/X11/Xaw/Text.h:
-
-/usr/include/X11/Xaw/TextSink.h:
-
-/usr/include/X11/Xaw/TextSrc.h:
-
-/usr/include/X11/Xaw/AsciiSrc.h:
-
-/usr/include/X11/Xaw/AsciiSink.h:
-
-/usr/include/X11/Xaw/MultiSrc.h:
-
-/usr/include/X11/Xaw/MenuButton.h:
-
-/usr/include/X11/Xaw/SimpleMenu.h:
-
-/usr/include/X11/Xaw/SmeBSB.h:
-
-/usr/include/X11/Xaw/Sme.h:
-
-/usr/include/X11/Xaw/SmeLine.h:
-
-SciPlot.h:
-
-/home/pierce/include/netcdf.h:
-
-/usr/include/errno.h:
-
-/usr/include/bits/errno.h:
-
-/usr/include/linux/errno.h:
-
-/usr/include/asm/errno.h:
-
-/usr/include/asm-generic/errno.h:
-
-/usr/include/asm-generic/errno-base.h:
-
-../config.h:
-
-ncview.defines.h:
-
-/home/pierce/include/udunits2.h:
-
-/home/pierce/include/converter.h:
-
-ncview.protos.h:
-
-overlay_coasts_p08deg.h:
-
-overlay_coasts_p8deg.h:
-
-overlay_usa.h:
diff --git a/src/.deps/plot_range.Po b/src/.deps/plot_range.Po
deleted file mode 100644
index 24c9b08..0000000
--- a/src/.deps/plot_range.Po
+++ /dev/null
@@ -1,291 +0,0 @@
-plot_range.o plot_range.o: interface/plot_range.c \
-  interface/../ncview.includes.h /usr/include/stdio.h \
-  /usr/include/features.h /usr/include/sys/cdefs.h \
-  /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
-  /usr/include/gnu/stubs-64.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h \
-  /usr/include/bits/types.h /usr/include/bits/typesizes.h \
-  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h \
-  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
-  /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
-  /usr/include/endian.h /usr/include/bits/endian.h \
-  /usr/include/sys/select.h /usr/include/bits/select.h \
-  /usr/include/bits/sigset.h /usr/include/bits/time.h \
-  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
-  /usr/include/alloca.h /usr/include/dirent.h /usr/include/bits/dirent.h \
-  /usr/include/bits/posix1_lim.h /usr/include/bits/local_lim.h \
-  /usr/include/linux/limits.h /usr/include/sys/stat.h \
-  /usr/include/bits/stat.h /usr/include/fcntl.h /usr/include/bits/fcntl.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/limits.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/syslimits.h \
-  /usr/include/limits.h /usr/include/bits/posix2_lim.h \
-  /usr/include/math.h /usr/include/bits/huge_val.h \
-  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
-  /usr/include/unistd.h /usr/include/bits/posix_opt.h \
-  /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/ctype.h \
-  /usr/include/X11/Intrinsic.h /usr/include/X11/Xlib.h \
-  /usr/include/X11/X.h /usr/include/X11/Xfuncproto.h \
-  /usr/include/X11/Xosdefs.h /usr/include/X11/Xutil.h \
-  /usr/include/X11/keysym.h /usr/include/X11/keysymdef.h \
-  /usr/include/X11/Xresource.h /usr/include/string.h \
-  /usr/include/X11/Core.h /usr/include/X11/Composite.h \
-  /usr/include/X11/Constraint.h /usr/include/X11/Object.h \
-  /usr/include/X11/RectObj.h /usr/include/X11/IntrinsicP.h \
-  /usr/include/X11/CoreP.h /usr/include/X11/CompositeP.h \
-  /usr/include/X11/ConstrainP.h /usr/include/X11/ObjectP.h \
-  /usr/include/X11/RectObjP.h /usr/include/X11/StringDefs.h \
-  /usr/include/X11/cursorfont.h /usr/include/X11/Shell.h \
-  /usr/include/X11/SM/SMlib.h /usr/include/X11/SM/SM.h \
-  /usr/include/X11/ICE/ICElib.h /usr/include/X11/ICE/ICE.h \
-  /usr/include/X11/Xaw/Form.h /usr/include/X11/Xaw/Box.h \
-  /usr/include/X11/Xmu/Converters.h /usr/include/X11/Xaw/Command.h \
-  /usr/include/X11/Xaw/Label.h /usr/include/X11/Xaw/Simple.h \
-  /usr/include/X11/Xaw/Toggle.h /usr/include/X11/Xaw/Dialog.h \
-  /usr/include/X11/Xaw/Scrollbar.h /usr/include/X11/Xaw/Viewport.h \
-  /usr/include/X11/Xaw/Reports.h /usr/include/X11/Xaw/List.h \
-  /usr/include/X11/Xaw/AsciiText.h /usr/include/X11/Xaw/Text.h \
-  /usr/include/X11/Xaw/TextSink.h /usr/include/X11/Xaw/TextSrc.h \
-  /usr/include/X11/Xaw/AsciiSrc.h /usr/include/X11/Xaw/AsciiSink.h \
-  /usr/include/X11/Xaw/MultiSrc.h /usr/include/X11/Xaw/MenuButton.h \
-  /usr/include/X11/Xaw/SimpleMenu.h /usr/include/X11/Xaw/SmeBSB.h \
-  /usr/include/X11/Xaw/Sme.h /usr/include/X11/Xaw/SmeLine.h \
-  interface/../SciPlot.h /home/pierce/include/netcdf.h \
-  /usr/include/errno.h /usr/include/bits/errno.h \
-  /usr/include/linux/errno.h /usr/include/asm/errno.h \
-  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
-  interface/../../config.h interface/../ncview.defines.h \
-  /home/pierce/include/udunits2.h /home/pierce/include/converter.h \
-  interface/../ncview.protos.h /usr/include/X11/Xatom.h
-
-interface/../ncview.includes.h:
-
-/usr/include/stdio.h:
-
-/usr/include/features.h:
-
-/usr/include/sys/cdefs.h:
-
-/usr/include/bits/wordsize.h:
-
-/usr/include/gnu/stubs.h:
-
-/usr/include/gnu/stubs-64.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h:
-
-/usr/include/bits/types.h:
-
-/usr/include/bits/typesizes.h:
-
-/usr/include/libio.h:
-
-/usr/include/_G_config.h:
-
-/usr/include/wchar.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h:
-
-/usr/include/bits/stdio_lim.h:
-
-/usr/include/bits/sys_errlist.h:
-
-/usr/include/stdlib.h:
-
-/usr/include/sys/types.h:
-
-/usr/include/time.h:
-
-/usr/include/endian.h:
-
-/usr/include/bits/endian.h:
-
-/usr/include/sys/select.h:
-
-/usr/include/bits/select.h:
-
-/usr/include/bits/sigset.h:
-
-/usr/include/bits/time.h:
-
-/usr/include/sys/sysmacros.h:
-
-/usr/include/bits/pthreadtypes.h:
-
-/usr/include/alloca.h:
-
-/usr/include/dirent.h:
-
-/usr/include/bits/dirent.h:
-
-/usr/include/bits/posix1_lim.h:
-
-/usr/include/bits/local_lim.h:
-
-/usr/include/linux/limits.h:
-
-/usr/include/sys/stat.h:
-
-/usr/include/bits/stat.h:
-
-/usr/include/fcntl.h:
-
-/usr/include/bits/fcntl.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/limits.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/syslimits.h:
-
-/usr/include/limits.h:
-
-/usr/include/bits/posix2_lim.h:
-
-/usr/include/math.h:
-
-/usr/include/bits/huge_val.h:
-
-/usr/include/bits/mathdef.h:
-
-/usr/include/bits/mathcalls.h:
-
-/usr/include/unistd.h:
-
-/usr/include/bits/posix_opt.h:
-
-/usr/include/bits/confname.h:
-
-/usr/include/getopt.h:
-
-/usr/include/ctype.h:
-
-/usr/include/X11/Intrinsic.h:
-
-/usr/include/X11/Xlib.h:
-
-/usr/include/X11/X.h:
-
-/usr/include/X11/Xfuncproto.h:
-
-/usr/include/X11/Xosdefs.h:
-
-/usr/include/X11/Xutil.h:
-
-/usr/include/X11/keysym.h:
-
-/usr/include/X11/keysymdef.h:
-
-/usr/include/X11/Xresource.h:
-
-/usr/include/string.h:
-
-/usr/include/X11/Core.h:
-
-/usr/include/X11/Composite.h:
-
-/usr/include/X11/Constraint.h:
-
-/usr/include/X11/Object.h:
-
-/usr/include/X11/RectObj.h:
-
-/usr/include/X11/IntrinsicP.h:
-
-/usr/include/X11/CoreP.h:
-
-/usr/include/X11/CompositeP.h:
-
-/usr/include/X11/ConstrainP.h:
-
-/usr/include/X11/ObjectP.h:
-
-/usr/include/X11/RectObjP.h:
-
-/usr/include/X11/StringDefs.h:
-
-/usr/include/X11/cursorfont.h:
-
-/usr/include/X11/Shell.h:
-
-/usr/include/X11/SM/SMlib.h:
-
-/usr/include/X11/SM/SM.h:
-
-/usr/include/X11/ICE/ICElib.h:
-
-/usr/include/X11/ICE/ICE.h:
-
-/usr/include/X11/Xaw/Form.h:
-
-/usr/include/X11/Xaw/Box.h:
-
-/usr/include/X11/Xmu/Converters.h:
-
-/usr/include/X11/Xaw/Command.h:
-
-/usr/include/X11/Xaw/Label.h:
-
-/usr/include/X11/Xaw/Simple.h:
-
-/usr/include/X11/Xaw/Toggle.h:
-
-/usr/include/X11/Xaw/Dialog.h:
-
-/usr/include/X11/Xaw/Scrollbar.h:
-
-/usr/include/X11/Xaw/Viewport.h:
-
-/usr/include/X11/Xaw/Reports.h:
-
-/usr/include/X11/Xaw/List.h:
-
-/usr/include/X11/Xaw/AsciiText.h:
-
-/usr/include/X11/Xaw/Text.h:
-
-/usr/include/X11/Xaw/TextSink.h:
-
-/usr/include/X11/Xaw/TextSrc.h:
-
-/usr/include/X11/Xaw/AsciiSrc.h:
-
-/usr/include/X11/Xaw/AsciiSink.h:
-
-/usr/include/X11/Xaw/MultiSrc.h:
-
-/usr/include/X11/Xaw/MenuButton.h:
-
-/usr/include/X11/Xaw/SimpleMenu.h:
-
-/usr/include/X11/Xaw/SmeBSB.h:
-
-/usr/include/X11/Xaw/Sme.h:
-
-/usr/include/X11/Xaw/SmeLine.h:
-
-interface/../SciPlot.h:
-
-/home/pierce/include/netcdf.h:
-
-/usr/include/errno.h:
-
-/usr/include/bits/errno.h:
-
-/usr/include/linux/errno.h:
-
-/usr/include/asm/errno.h:
-
-/usr/include/asm-generic/errno.h:
-
-/usr/include/asm-generic/errno-base.h:
-
-interface/../../config.h:
-
-interface/../ncview.defines.h:
-
-/home/pierce/include/udunits2.h:
-
-/home/pierce/include/converter.h:
-
-interface/../ncview.protos.h:
-
-/usr/include/X11/Xatom.h:
diff --git a/src/.deps/plot_xy.Po b/src/.deps/plot_xy.Po
deleted file mode 100644
index 1c07d08..0000000
--- a/src/.deps/plot_xy.Po
+++ /dev/null
@@ -1,288 +0,0 @@
-plot_xy.o plot_xy.o: interface/plot_xy.c interface/../ncview.includes.h \
-  /usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \
-  /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
-  /usr/include/gnu/stubs-64.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h \
-  /usr/include/bits/types.h /usr/include/bits/typesizes.h \
-  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h \
-  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
-  /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
-  /usr/include/endian.h /usr/include/bits/endian.h \
-  /usr/include/sys/select.h /usr/include/bits/select.h \
-  /usr/include/bits/sigset.h /usr/include/bits/time.h \
-  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
-  /usr/include/alloca.h /usr/include/dirent.h /usr/include/bits/dirent.h \
-  /usr/include/bits/posix1_lim.h /usr/include/bits/local_lim.h \
-  /usr/include/linux/limits.h /usr/include/sys/stat.h \
-  /usr/include/bits/stat.h /usr/include/fcntl.h /usr/include/bits/fcntl.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/limits.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/syslimits.h \
-  /usr/include/limits.h /usr/include/bits/posix2_lim.h \
-  /usr/include/math.h /usr/include/bits/huge_val.h \
-  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
-  /usr/include/unistd.h /usr/include/bits/posix_opt.h \
-  /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/ctype.h \
-  /usr/include/X11/Intrinsic.h /usr/include/X11/Xlib.h \
-  /usr/include/X11/X.h /usr/include/X11/Xfuncproto.h \
-  /usr/include/X11/Xosdefs.h /usr/include/X11/Xutil.h \
-  /usr/include/X11/keysym.h /usr/include/X11/keysymdef.h \
-  /usr/include/X11/Xresource.h /usr/include/string.h \
-  /usr/include/X11/Core.h /usr/include/X11/Composite.h \
-  /usr/include/X11/Constraint.h /usr/include/X11/Object.h \
-  /usr/include/X11/RectObj.h /usr/include/X11/IntrinsicP.h \
-  /usr/include/X11/CoreP.h /usr/include/X11/CompositeP.h \
-  /usr/include/X11/ConstrainP.h /usr/include/X11/ObjectP.h \
-  /usr/include/X11/RectObjP.h /usr/include/X11/StringDefs.h \
-  /usr/include/X11/cursorfont.h /usr/include/X11/Shell.h \
-  /usr/include/X11/SM/SMlib.h /usr/include/X11/SM/SM.h \
-  /usr/include/X11/ICE/ICElib.h /usr/include/X11/ICE/ICE.h \
-  /usr/include/X11/Xaw/Form.h /usr/include/X11/Xaw/Box.h \
-  /usr/include/X11/Xmu/Converters.h /usr/include/X11/Xaw/Command.h \
-  /usr/include/X11/Xaw/Label.h /usr/include/X11/Xaw/Simple.h \
-  /usr/include/X11/Xaw/Toggle.h /usr/include/X11/Xaw/Dialog.h \
-  /usr/include/X11/Xaw/Scrollbar.h /usr/include/X11/Xaw/Viewport.h \
-  /usr/include/X11/Xaw/Reports.h /usr/include/X11/Xaw/List.h \
-  /usr/include/X11/Xaw/AsciiText.h /usr/include/X11/Xaw/Text.h \
-  /usr/include/X11/Xaw/TextSink.h /usr/include/X11/Xaw/TextSrc.h \
-  /usr/include/X11/Xaw/AsciiSrc.h /usr/include/X11/Xaw/AsciiSink.h \
-  /usr/include/X11/Xaw/MultiSrc.h /usr/include/X11/Xaw/MenuButton.h \
-  /usr/include/X11/Xaw/SimpleMenu.h /usr/include/X11/Xaw/SmeBSB.h \
-  /usr/include/X11/Xaw/Sme.h /usr/include/X11/Xaw/SmeLine.h \
-  interface/../SciPlot.h /home/pierce/include/netcdf.h \
-  /usr/include/errno.h /usr/include/bits/errno.h \
-  /usr/include/linux/errno.h /usr/include/asm/errno.h \
-  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
-  interface/../../config.h interface/../ncview.defines.h \
-  /home/pierce/include/udunits2.h /home/pierce/include/converter.h \
-  interface/../ncview.protos.h
-
-interface/../ncview.includes.h:
-
-/usr/include/stdio.h:
-
-/usr/include/features.h:
-
-/usr/include/sys/cdefs.h:
-
-/usr/include/bits/wordsize.h:
-
-/usr/include/gnu/stubs.h:
-
-/usr/include/gnu/stubs-64.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h:
-
-/usr/include/bits/types.h:
-
-/usr/include/bits/typesizes.h:
-
-/usr/include/libio.h:
-
-/usr/include/_G_config.h:
-
-/usr/include/wchar.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h:
-
-/usr/include/bits/stdio_lim.h:
-
-/usr/include/bits/sys_errlist.h:
-
-/usr/include/stdlib.h:
-
-/usr/include/sys/types.h:
-
-/usr/include/time.h:
-
-/usr/include/endian.h:
-
-/usr/include/bits/endian.h:
-
-/usr/include/sys/select.h:
-
-/usr/include/bits/select.h:
-
-/usr/include/bits/sigset.h:
-
-/usr/include/bits/time.h:
-
-/usr/include/sys/sysmacros.h:
-
-/usr/include/bits/pthreadtypes.h:
-
-/usr/include/alloca.h:
-
-/usr/include/dirent.h:
-
-/usr/include/bits/dirent.h:
-
-/usr/include/bits/posix1_lim.h:
-
-/usr/include/bits/local_lim.h:
-
-/usr/include/linux/limits.h:
-
-/usr/include/sys/stat.h:
-
-/usr/include/bits/stat.h:
-
-/usr/include/fcntl.h:
-
-/usr/include/bits/fcntl.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/limits.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/syslimits.h:
-
-/usr/include/limits.h:
-
-/usr/include/bits/posix2_lim.h:
-
-/usr/include/math.h:
-
-/usr/include/bits/huge_val.h:
-
-/usr/include/bits/mathdef.h:
-
-/usr/include/bits/mathcalls.h:
-
-/usr/include/unistd.h:
-
-/usr/include/bits/posix_opt.h:
-
-/usr/include/bits/confname.h:
-
-/usr/include/getopt.h:
-
-/usr/include/ctype.h:
-
-/usr/include/X11/Intrinsic.h:
-
-/usr/include/X11/Xlib.h:
-
-/usr/include/X11/X.h:
-
-/usr/include/X11/Xfuncproto.h:
-
-/usr/include/X11/Xosdefs.h:
-
-/usr/include/X11/Xutil.h:
-
-/usr/include/X11/keysym.h:
-
-/usr/include/X11/keysymdef.h:
-
-/usr/include/X11/Xresource.h:
-
-/usr/include/string.h:
-
-/usr/include/X11/Core.h:
-
-/usr/include/X11/Composite.h:
-
-/usr/include/X11/Constraint.h:
-
-/usr/include/X11/Object.h:
-
-/usr/include/X11/RectObj.h:
-
-/usr/include/X11/IntrinsicP.h:
-
-/usr/include/X11/CoreP.h:
-
-/usr/include/X11/CompositeP.h:
-
-/usr/include/X11/ConstrainP.h:
-
-/usr/include/X11/ObjectP.h:
-
-/usr/include/X11/RectObjP.h:
-
-/usr/include/X11/StringDefs.h:
-
-/usr/include/X11/cursorfont.h:
-
-/usr/include/X11/Shell.h:
-
-/usr/include/X11/SM/SMlib.h:
-
-/usr/include/X11/SM/SM.h:
-
-/usr/include/X11/ICE/ICElib.h:
-
-/usr/include/X11/ICE/ICE.h:
-
-/usr/include/X11/Xaw/Form.h:
-
-/usr/include/X11/Xaw/Box.h:
-
-/usr/include/X11/Xmu/Converters.h:
-
-/usr/include/X11/Xaw/Command.h:
-
-/usr/include/X11/Xaw/Label.h:
-
-/usr/include/X11/Xaw/Simple.h:
-
-/usr/include/X11/Xaw/Toggle.h:
-
-/usr/include/X11/Xaw/Dialog.h:
-
-/usr/include/X11/Xaw/Scrollbar.h:
-
-/usr/include/X11/Xaw/Viewport.h:
-
-/usr/include/X11/Xaw/Reports.h:
-
-/usr/include/X11/Xaw/List.h:
-
-/usr/include/X11/Xaw/AsciiText.h:
-
-/usr/include/X11/Xaw/Text.h:
-
-/usr/include/X11/Xaw/TextSink.h:
-
-/usr/include/X11/Xaw/TextSrc.h:
-
-/usr/include/X11/Xaw/AsciiSrc.h:
-
-/usr/include/X11/Xaw/AsciiSink.h:
-
-/usr/include/X11/Xaw/MultiSrc.h:
-
-/usr/include/X11/Xaw/MenuButton.h:
-
-/usr/include/X11/Xaw/SimpleMenu.h:
-
-/usr/include/X11/Xaw/SmeBSB.h:
-
-/usr/include/X11/Xaw/Sme.h:
-
-/usr/include/X11/Xaw/SmeLine.h:
-
-interface/../SciPlot.h:
-
-/home/pierce/include/netcdf.h:
-
-/usr/include/errno.h:
-
-/usr/include/bits/errno.h:
-
-/usr/include/linux/errno.h:
-
-/usr/include/asm/errno.h:
-
-/usr/include/asm-generic/errno.h:
-
-/usr/include/asm-generic/errno-base.h:
-
-interface/../../config.h:
-
-interface/../ncview.defines.h:
-
-/home/pierce/include/udunits2.h:
-
-/home/pierce/include/converter.h:
-
-interface/../ncview.protos.h:
diff --git a/src/.deps/printer_options.Po b/src/.deps/printer_options.Po
deleted file mode 100644
index a7328a3..0000000
--- a/src/.deps/printer_options.Po
+++ /dev/null
@@ -1,289 +0,0 @@
-printer_options.o printer_options.o: interface/printer_options.c \
-  interface/../ncview.includes.h /usr/include/stdio.h \
-  /usr/include/features.h /usr/include/sys/cdefs.h \
-  /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
-  /usr/include/gnu/stubs-64.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h \
-  /usr/include/bits/types.h /usr/include/bits/typesizes.h \
-  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h \
-  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
-  /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
-  /usr/include/endian.h /usr/include/bits/endian.h \
-  /usr/include/sys/select.h /usr/include/bits/select.h \
-  /usr/include/bits/sigset.h /usr/include/bits/time.h \
-  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
-  /usr/include/alloca.h /usr/include/dirent.h /usr/include/bits/dirent.h \
-  /usr/include/bits/posix1_lim.h /usr/include/bits/local_lim.h \
-  /usr/include/linux/limits.h /usr/include/sys/stat.h \
-  /usr/include/bits/stat.h /usr/include/fcntl.h /usr/include/bits/fcntl.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/limits.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/syslimits.h \
-  /usr/include/limits.h /usr/include/bits/posix2_lim.h \
-  /usr/include/math.h /usr/include/bits/huge_val.h \
-  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
-  /usr/include/unistd.h /usr/include/bits/posix_opt.h \
-  /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/ctype.h \
-  /usr/include/X11/Intrinsic.h /usr/include/X11/Xlib.h \
-  /usr/include/X11/X.h /usr/include/X11/Xfuncproto.h \
-  /usr/include/X11/Xosdefs.h /usr/include/X11/Xutil.h \
-  /usr/include/X11/keysym.h /usr/include/X11/keysymdef.h \
-  /usr/include/X11/Xresource.h /usr/include/string.h \
-  /usr/include/X11/Core.h /usr/include/X11/Composite.h \
-  /usr/include/X11/Constraint.h /usr/include/X11/Object.h \
-  /usr/include/X11/RectObj.h /usr/include/X11/IntrinsicP.h \
-  /usr/include/X11/CoreP.h /usr/include/X11/CompositeP.h \
-  /usr/include/X11/ConstrainP.h /usr/include/X11/ObjectP.h \
-  /usr/include/X11/RectObjP.h /usr/include/X11/StringDefs.h \
-  /usr/include/X11/cursorfont.h /usr/include/X11/Shell.h \
-  /usr/include/X11/SM/SMlib.h /usr/include/X11/SM/SM.h \
-  /usr/include/X11/ICE/ICElib.h /usr/include/X11/ICE/ICE.h \
-  /usr/include/X11/Xaw/Form.h /usr/include/X11/Xaw/Box.h \
-  /usr/include/X11/Xmu/Converters.h /usr/include/X11/Xaw/Command.h \
-  /usr/include/X11/Xaw/Label.h /usr/include/X11/Xaw/Simple.h \
-  /usr/include/X11/Xaw/Toggle.h /usr/include/X11/Xaw/Dialog.h \
-  /usr/include/X11/Xaw/Scrollbar.h /usr/include/X11/Xaw/Viewport.h \
-  /usr/include/X11/Xaw/Reports.h /usr/include/X11/Xaw/List.h \
-  /usr/include/X11/Xaw/AsciiText.h /usr/include/X11/Xaw/Text.h \
-  /usr/include/X11/Xaw/TextSink.h /usr/include/X11/Xaw/TextSrc.h \
-  /usr/include/X11/Xaw/AsciiSrc.h /usr/include/X11/Xaw/AsciiSink.h \
-  /usr/include/X11/Xaw/MultiSrc.h /usr/include/X11/Xaw/MenuButton.h \
-  /usr/include/X11/Xaw/SimpleMenu.h /usr/include/X11/Xaw/SmeBSB.h \
-  /usr/include/X11/Xaw/Sme.h /usr/include/X11/Xaw/SmeLine.h \
-  interface/../SciPlot.h /home/pierce/include/netcdf.h \
-  /usr/include/errno.h /usr/include/bits/errno.h \
-  /usr/include/linux/errno.h /usr/include/asm/errno.h \
-  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
-  interface/../../config.h interface/../ncview.defines.h \
-  /home/pierce/include/udunits2.h /home/pierce/include/converter.h \
-  interface/../ncview.protos.h
-
-interface/../ncview.includes.h:
-
-/usr/include/stdio.h:
-
-/usr/include/features.h:
-
-/usr/include/sys/cdefs.h:
-
-/usr/include/bits/wordsize.h:
-
-/usr/include/gnu/stubs.h:
-
-/usr/include/gnu/stubs-64.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h:
-
-/usr/include/bits/types.h:
-
-/usr/include/bits/typesizes.h:
-
-/usr/include/libio.h:
-
-/usr/include/_G_config.h:
-
-/usr/include/wchar.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h:
-
-/usr/include/bits/stdio_lim.h:
-
-/usr/include/bits/sys_errlist.h:
-
-/usr/include/stdlib.h:
-
-/usr/include/sys/types.h:
-
-/usr/include/time.h:
-
-/usr/include/endian.h:
-
-/usr/include/bits/endian.h:
-
-/usr/include/sys/select.h:
-
-/usr/include/bits/select.h:
-
-/usr/include/bits/sigset.h:
-
-/usr/include/bits/time.h:
-
-/usr/include/sys/sysmacros.h:
-
-/usr/include/bits/pthreadtypes.h:
-
-/usr/include/alloca.h:
-
-/usr/include/dirent.h:
-
-/usr/include/bits/dirent.h:
-
-/usr/include/bits/posix1_lim.h:
-
-/usr/include/bits/local_lim.h:
-
-/usr/include/linux/limits.h:
-
-/usr/include/sys/stat.h:
-
-/usr/include/bits/stat.h:
-
-/usr/include/fcntl.h:
-
-/usr/include/bits/fcntl.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/limits.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/syslimits.h:
-
-/usr/include/limits.h:
-
-/usr/include/bits/posix2_lim.h:
-
-/usr/include/math.h:
-
-/usr/include/bits/huge_val.h:
-
-/usr/include/bits/mathdef.h:
-
-/usr/include/bits/mathcalls.h:
-
-/usr/include/unistd.h:
-
-/usr/include/bits/posix_opt.h:
-
-/usr/include/bits/confname.h:
-
-/usr/include/getopt.h:
-
-/usr/include/ctype.h:
-
-/usr/include/X11/Intrinsic.h:
-
-/usr/include/X11/Xlib.h:
-
-/usr/include/X11/X.h:
-
-/usr/include/X11/Xfuncproto.h:
-
-/usr/include/X11/Xosdefs.h:
-
-/usr/include/X11/Xutil.h:
-
-/usr/include/X11/keysym.h:
-
-/usr/include/X11/keysymdef.h:
-
-/usr/include/X11/Xresource.h:
-
-/usr/include/string.h:
-
-/usr/include/X11/Core.h:
-
-/usr/include/X11/Composite.h:
-
-/usr/include/X11/Constraint.h:
-
-/usr/include/X11/Object.h:
-
-/usr/include/X11/RectObj.h:
-
-/usr/include/X11/IntrinsicP.h:
-
-/usr/include/X11/CoreP.h:
-
-/usr/include/X11/CompositeP.h:
-
-/usr/include/X11/ConstrainP.h:
-
-/usr/include/X11/ObjectP.h:
-
-/usr/include/X11/RectObjP.h:
-
-/usr/include/X11/StringDefs.h:
-
-/usr/include/X11/cursorfont.h:
-
-/usr/include/X11/Shell.h:
-
-/usr/include/X11/SM/SMlib.h:
-
-/usr/include/X11/SM/SM.h:
-
-/usr/include/X11/ICE/ICElib.h:
-
-/usr/include/X11/ICE/ICE.h:
-
-/usr/include/X11/Xaw/Form.h:
-
-/usr/include/X11/Xaw/Box.h:
-
-/usr/include/X11/Xmu/Converters.h:
-
-/usr/include/X11/Xaw/Command.h:
-
-/usr/include/X11/Xaw/Label.h:
-
-/usr/include/X11/Xaw/Simple.h:
-
-/usr/include/X11/Xaw/Toggle.h:
-
-/usr/include/X11/Xaw/Dialog.h:
-
-/usr/include/X11/Xaw/Scrollbar.h:
-
-/usr/include/X11/Xaw/Viewport.h:
-
-/usr/include/X11/Xaw/Reports.h:
-
-/usr/include/X11/Xaw/List.h:
-
-/usr/include/X11/Xaw/AsciiText.h:
-
-/usr/include/X11/Xaw/Text.h:
-
-/usr/include/X11/Xaw/TextSink.h:
-
-/usr/include/X11/Xaw/TextSrc.h:
-
-/usr/include/X11/Xaw/AsciiSrc.h:
-
-/usr/include/X11/Xaw/AsciiSink.h:
-
-/usr/include/X11/Xaw/MultiSrc.h:
-
-/usr/include/X11/Xaw/MenuButton.h:
-
-/usr/include/X11/Xaw/SimpleMenu.h:
-
-/usr/include/X11/Xaw/SmeBSB.h:
-
-/usr/include/X11/Xaw/Sme.h:
-
-/usr/include/X11/Xaw/SmeLine.h:
-
-interface/../SciPlot.h:
-
-/home/pierce/include/netcdf.h:
-
-/usr/include/errno.h:
-
-/usr/include/bits/errno.h:
-
-/usr/include/linux/errno.h:
-
-/usr/include/asm/errno.h:
-
-/usr/include/asm-generic/errno.h:
-
-/usr/include/asm-generic/errno-base.h:
-
-interface/../../config.h:
-
-interface/../ncview.defines.h:
-
-/home/pierce/include/udunits2.h:
-
-/home/pierce/include/converter.h:
-
-interface/../ncview.protos.h:
diff --git a/src/.deps/range.Po b/src/.deps/range.Po
deleted file mode 100644
index d6d48db..0000000
--- a/src/.deps/range.Po
+++ /dev/null
@@ -1,290 +0,0 @@
-range.o range.o: interface/range.c interface/../ncview.includes.h \
-  /usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \
-  /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
-  /usr/include/gnu/stubs-64.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h \
-  /usr/include/bits/types.h /usr/include/bits/typesizes.h \
-  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h \
-  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
-  /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
-  /usr/include/endian.h /usr/include/bits/endian.h \
-  /usr/include/sys/select.h /usr/include/bits/select.h \
-  /usr/include/bits/sigset.h /usr/include/bits/time.h \
-  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
-  /usr/include/alloca.h /usr/include/dirent.h /usr/include/bits/dirent.h \
-  /usr/include/bits/posix1_lim.h /usr/include/bits/local_lim.h \
-  /usr/include/linux/limits.h /usr/include/sys/stat.h \
-  /usr/include/bits/stat.h /usr/include/fcntl.h /usr/include/bits/fcntl.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/limits.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/syslimits.h \
-  /usr/include/limits.h /usr/include/bits/posix2_lim.h \
-  /usr/include/math.h /usr/include/bits/huge_val.h \
-  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
-  /usr/include/unistd.h /usr/include/bits/posix_opt.h \
-  /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/ctype.h \
-  /usr/include/X11/Intrinsic.h /usr/include/X11/Xlib.h \
-  /usr/include/X11/X.h /usr/include/X11/Xfuncproto.h \
-  /usr/include/X11/Xosdefs.h /usr/include/X11/Xutil.h \
-  /usr/include/X11/keysym.h /usr/include/X11/keysymdef.h \
-  /usr/include/X11/Xresource.h /usr/include/string.h \
-  /usr/include/X11/Core.h /usr/include/X11/Composite.h \
-  /usr/include/X11/Constraint.h /usr/include/X11/Object.h \
-  /usr/include/X11/RectObj.h /usr/include/X11/IntrinsicP.h \
-  /usr/include/X11/CoreP.h /usr/include/X11/CompositeP.h \
-  /usr/include/X11/ConstrainP.h /usr/include/X11/ObjectP.h \
-  /usr/include/X11/RectObjP.h /usr/include/X11/StringDefs.h \
-  /usr/include/X11/cursorfont.h /usr/include/X11/Shell.h \
-  /usr/include/X11/SM/SMlib.h /usr/include/X11/SM/SM.h \
-  /usr/include/X11/ICE/ICElib.h /usr/include/X11/ICE/ICE.h \
-  /usr/include/X11/Xaw/Form.h /usr/include/X11/Xaw/Box.h \
-  /usr/include/X11/Xmu/Converters.h /usr/include/X11/Xaw/Command.h \
-  /usr/include/X11/Xaw/Label.h /usr/include/X11/Xaw/Simple.h \
-  /usr/include/X11/Xaw/Toggle.h /usr/include/X11/Xaw/Dialog.h \
-  /usr/include/X11/Xaw/Scrollbar.h /usr/include/X11/Xaw/Viewport.h \
-  /usr/include/X11/Xaw/Reports.h /usr/include/X11/Xaw/List.h \
-  /usr/include/X11/Xaw/AsciiText.h /usr/include/X11/Xaw/Text.h \
-  /usr/include/X11/Xaw/TextSink.h /usr/include/X11/Xaw/TextSrc.h \
-  /usr/include/X11/Xaw/AsciiSrc.h /usr/include/X11/Xaw/AsciiSink.h \
-  /usr/include/X11/Xaw/MultiSrc.h /usr/include/X11/Xaw/MenuButton.h \
-  /usr/include/X11/Xaw/SimpleMenu.h /usr/include/X11/Xaw/SmeBSB.h \
-  /usr/include/X11/Xaw/Sme.h /usr/include/X11/Xaw/SmeLine.h \
-  interface/../SciPlot.h /home/pierce/include/netcdf.h \
-  /usr/include/errno.h /usr/include/bits/errno.h \
-  /usr/include/linux/errno.h /usr/include/asm/errno.h \
-  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
-  interface/../../config.h interface/../ncview.defines.h \
-  /home/pierce/include/udunits2.h /home/pierce/include/converter.h \
-  interface/../ncview.protos.h /usr/include/X11/Xatom.h
-
-interface/../ncview.includes.h:
-
-/usr/include/stdio.h:
-
-/usr/include/features.h:
-
-/usr/include/sys/cdefs.h:
-
-/usr/include/bits/wordsize.h:
-
-/usr/include/gnu/stubs.h:
-
-/usr/include/gnu/stubs-64.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h:
-
-/usr/include/bits/types.h:
-
-/usr/include/bits/typesizes.h:
-
-/usr/include/libio.h:
-
-/usr/include/_G_config.h:
-
-/usr/include/wchar.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h:
-
-/usr/include/bits/stdio_lim.h:
-
-/usr/include/bits/sys_errlist.h:
-
-/usr/include/stdlib.h:
-
-/usr/include/sys/types.h:
-
-/usr/include/time.h:
-
-/usr/include/endian.h:
-
-/usr/include/bits/endian.h:
-
-/usr/include/sys/select.h:
-
-/usr/include/bits/select.h:
-
-/usr/include/bits/sigset.h:
-
-/usr/include/bits/time.h:
-
-/usr/include/sys/sysmacros.h:
-
-/usr/include/bits/pthreadtypes.h:
-
-/usr/include/alloca.h:
-
-/usr/include/dirent.h:
-
-/usr/include/bits/dirent.h:
-
-/usr/include/bits/posix1_lim.h:
-
-/usr/include/bits/local_lim.h:
-
-/usr/include/linux/limits.h:
-
-/usr/include/sys/stat.h:
-
-/usr/include/bits/stat.h:
-
-/usr/include/fcntl.h:
-
-/usr/include/bits/fcntl.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/limits.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/syslimits.h:
-
-/usr/include/limits.h:
-
-/usr/include/bits/posix2_lim.h:
-
-/usr/include/math.h:
-
-/usr/include/bits/huge_val.h:
-
-/usr/include/bits/mathdef.h:
-
-/usr/include/bits/mathcalls.h:
-
-/usr/include/unistd.h:
-
-/usr/include/bits/posix_opt.h:
-
-/usr/include/bits/confname.h:
-
-/usr/include/getopt.h:
-
-/usr/include/ctype.h:
-
-/usr/include/X11/Intrinsic.h:
-
-/usr/include/X11/Xlib.h:
-
-/usr/include/X11/X.h:
-
-/usr/include/X11/Xfuncproto.h:
-
-/usr/include/X11/Xosdefs.h:
-
-/usr/include/X11/Xutil.h:
-
-/usr/include/X11/keysym.h:
-
-/usr/include/X11/keysymdef.h:
-
-/usr/include/X11/Xresource.h:
-
-/usr/include/string.h:
-
-/usr/include/X11/Core.h:
-
-/usr/include/X11/Composite.h:
-
-/usr/include/X11/Constraint.h:
-
-/usr/include/X11/Object.h:
-
-/usr/include/X11/RectObj.h:
-
-/usr/include/X11/IntrinsicP.h:
-
-/usr/include/X11/CoreP.h:
-
-/usr/include/X11/CompositeP.h:
-
-/usr/include/X11/ConstrainP.h:
-
-/usr/include/X11/ObjectP.h:
-
-/usr/include/X11/RectObjP.h:
-
-/usr/include/X11/StringDefs.h:
-
-/usr/include/X11/cursorfont.h:
-
-/usr/include/X11/Shell.h:
-
-/usr/include/X11/SM/SMlib.h:
-
-/usr/include/X11/SM/SM.h:
-
-/usr/include/X11/ICE/ICElib.h:
-
-/usr/include/X11/ICE/ICE.h:
-
-/usr/include/X11/Xaw/Form.h:
-
-/usr/include/X11/Xaw/Box.h:
-
-/usr/include/X11/Xmu/Converters.h:
-
-/usr/include/X11/Xaw/Command.h:
-
-/usr/include/X11/Xaw/Label.h:
-
-/usr/include/X11/Xaw/Simple.h:
-
-/usr/include/X11/Xaw/Toggle.h:
-
-/usr/include/X11/Xaw/Dialog.h:
-
-/usr/include/X11/Xaw/Scrollbar.h:
-
-/usr/include/X11/Xaw/Viewport.h:
-
-/usr/include/X11/Xaw/Reports.h:
-
-/usr/include/X11/Xaw/List.h:
-
-/usr/include/X11/Xaw/AsciiText.h:
-
-/usr/include/X11/Xaw/Text.h:
-
-/usr/include/X11/Xaw/TextSink.h:
-
-/usr/include/X11/Xaw/TextSrc.h:
-
-/usr/include/X11/Xaw/AsciiSrc.h:
-
-/usr/include/X11/Xaw/AsciiSink.h:
-
-/usr/include/X11/Xaw/MultiSrc.h:
-
-/usr/include/X11/Xaw/MenuButton.h:
-
-/usr/include/X11/Xaw/SimpleMenu.h:
-
-/usr/include/X11/Xaw/SmeBSB.h:
-
-/usr/include/X11/Xaw/Sme.h:
-
-/usr/include/X11/Xaw/SmeLine.h:
-
-interface/../SciPlot.h:
-
-/home/pierce/include/netcdf.h:
-
-/usr/include/errno.h:
-
-/usr/include/bits/errno.h:
-
-/usr/include/linux/errno.h:
-
-/usr/include/asm/errno.h:
-
-/usr/include/asm-generic/errno.h:
-
-/usr/include/asm-generic/errno-base.h:
-
-interface/../../config.h:
-
-interface/../ncview.defines.h:
-
-/home/pierce/include/udunits2.h:
-
-/home/pierce/include/converter.h:
-
-interface/../ncview.protos.h:
-
-/usr/include/X11/Xatom.h:
diff --git a/src/.deps/set_options.Po b/src/.deps/set_options.Po
deleted file mode 100644
index 75bf51a..0000000
--- a/src/.deps/set_options.Po
+++ /dev/null
@@ -1,291 +0,0 @@
-set_options.o set_options.o: interface/set_options.c \
-  interface/../ncview.includes.h /usr/include/stdio.h \
-  /usr/include/features.h /usr/include/sys/cdefs.h \
-  /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
-  /usr/include/gnu/stubs-64.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h \
-  /usr/include/bits/types.h /usr/include/bits/typesizes.h \
-  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h \
-  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
-  /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
-  /usr/include/endian.h /usr/include/bits/endian.h \
-  /usr/include/sys/select.h /usr/include/bits/select.h \
-  /usr/include/bits/sigset.h /usr/include/bits/time.h \
-  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
-  /usr/include/alloca.h /usr/include/dirent.h /usr/include/bits/dirent.h \
-  /usr/include/bits/posix1_lim.h /usr/include/bits/local_lim.h \
-  /usr/include/linux/limits.h /usr/include/sys/stat.h \
-  /usr/include/bits/stat.h /usr/include/fcntl.h /usr/include/bits/fcntl.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/limits.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/syslimits.h \
-  /usr/include/limits.h /usr/include/bits/posix2_lim.h \
-  /usr/include/math.h /usr/include/bits/huge_val.h \
-  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
-  /usr/include/unistd.h /usr/include/bits/posix_opt.h \
-  /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/ctype.h \
-  /usr/include/X11/Intrinsic.h /usr/include/X11/Xlib.h \
-  /usr/include/X11/X.h /usr/include/X11/Xfuncproto.h \
-  /usr/include/X11/Xosdefs.h /usr/include/X11/Xutil.h \
-  /usr/include/X11/keysym.h /usr/include/X11/keysymdef.h \
-  /usr/include/X11/Xresource.h /usr/include/string.h \
-  /usr/include/X11/Core.h /usr/include/X11/Composite.h \
-  /usr/include/X11/Constraint.h /usr/include/X11/Object.h \
-  /usr/include/X11/RectObj.h /usr/include/X11/IntrinsicP.h \
-  /usr/include/X11/CoreP.h /usr/include/X11/CompositeP.h \
-  /usr/include/X11/ConstrainP.h /usr/include/X11/ObjectP.h \
-  /usr/include/X11/RectObjP.h /usr/include/X11/StringDefs.h \
-  /usr/include/X11/cursorfont.h /usr/include/X11/Shell.h \
-  /usr/include/X11/SM/SMlib.h /usr/include/X11/SM/SM.h \
-  /usr/include/X11/ICE/ICElib.h /usr/include/X11/ICE/ICE.h \
-  /usr/include/X11/Xaw/Form.h /usr/include/X11/Xaw/Box.h \
-  /usr/include/X11/Xmu/Converters.h /usr/include/X11/Xaw/Command.h \
-  /usr/include/X11/Xaw/Label.h /usr/include/X11/Xaw/Simple.h \
-  /usr/include/X11/Xaw/Toggle.h /usr/include/X11/Xaw/Dialog.h \
-  /usr/include/X11/Xaw/Scrollbar.h /usr/include/X11/Xaw/Viewport.h \
-  /usr/include/X11/Xaw/Reports.h /usr/include/X11/Xaw/List.h \
-  /usr/include/X11/Xaw/AsciiText.h /usr/include/X11/Xaw/Text.h \
-  /usr/include/X11/Xaw/TextSink.h /usr/include/X11/Xaw/TextSrc.h \
-  /usr/include/X11/Xaw/AsciiSrc.h /usr/include/X11/Xaw/AsciiSink.h \
-  /usr/include/X11/Xaw/MultiSrc.h /usr/include/X11/Xaw/MenuButton.h \
-  /usr/include/X11/Xaw/SimpleMenu.h /usr/include/X11/Xaw/SmeBSB.h \
-  /usr/include/X11/Xaw/Sme.h /usr/include/X11/Xaw/SmeLine.h \
-  interface/../SciPlot.h /home/pierce/include/netcdf.h \
-  /usr/include/errno.h /usr/include/bits/errno.h \
-  /usr/include/linux/errno.h /usr/include/asm/errno.h \
-  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
-  interface/../../config.h interface/../ncview.defines.h \
-  /home/pierce/include/udunits2.h /home/pierce/include/converter.h \
-  interface/../ncview.protos.h interface/RadioWidget.h
-
-interface/../ncview.includes.h:
-
-/usr/include/stdio.h:
-
-/usr/include/features.h:
-
-/usr/include/sys/cdefs.h:
-
-/usr/include/bits/wordsize.h:
-
-/usr/include/gnu/stubs.h:
-
-/usr/include/gnu/stubs-64.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h:
-
-/usr/include/bits/types.h:
-
-/usr/include/bits/typesizes.h:
-
-/usr/include/libio.h:
-
-/usr/include/_G_config.h:
-
-/usr/include/wchar.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h:
-
-/usr/include/bits/stdio_lim.h:
-
-/usr/include/bits/sys_errlist.h:
-
-/usr/include/stdlib.h:
-
-/usr/include/sys/types.h:
-
-/usr/include/time.h:
-
-/usr/include/endian.h:
-
-/usr/include/bits/endian.h:
-
-/usr/include/sys/select.h:
-
-/usr/include/bits/select.h:
-
-/usr/include/bits/sigset.h:
-
-/usr/include/bits/time.h:
-
-/usr/include/sys/sysmacros.h:
-
-/usr/include/bits/pthreadtypes.h:
-
-/usr/include/alloca.h:
-
-/usr/include/dirent.h:
-
-/usr/include/bits/dirent.h:
-
-/usr/include/bits/posix1_lim.h:
-
-/usr/include/bits/local_lim.h:
-
-/usr/include/linux/limits.h:
-
-/usr/include/sys/stat.h:
-
-/usr/include/bits/stat.h:
-
-/usr/include/fcntl.h:
-
-/usr/include/bits/fcntl.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/limits.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/syslimits.h:
-
-/usr/include/limits.h:
-
-/usr/include/bits/posix2_lim.h:
-
-/usr/include/math.h:
-
-/usr/include/bits/huge_val.h:
-
-/usr/include/bits/mathdef.h:
-
-/usr/include/bits/mathcalls.h:
-
-/usr/include/unistd.h:
-
-/usr/include/bits/posix_opt.h:
-
-/usr/include/bits/confname.h:
-
-/usr/include/getopt.h:
-
-/usr/include/ctype.h:
-
-/usr/include/X11/Intrinsic.h:
-
-/usr/include/X11/Xlib.h:
-
-/usr/include/X11/X.h:
-
-/usr/include/X11/Xfuncproto.h:
-
-/usr/include/X11/Xosdefs.h:
-
-/usr/include/X11/Xutil.h:
-
-/usr/include/X11/keysym.h:
-
-/usr/include/X11/keysymdef.h:
-
-/usr/include/X11/Xresource.h:
-
-/usr/include/string.h:
-
-/usr/include/X11/Core.h:
-
-/usr/include/X11/Composite.h:
-
-/usr/include/X11/Constraint.h:
-
-/usr/include/X11/Object.h:
-
-/usr/include/X11/RectObj.h:
-
-/usr/include/X11/IntrinsicP.h:
-
-/usr/include/X11/CoreP.h:
-
-/usr/include/X11/CompositeP.h:
-
-/usr/include/X11/ConstrainP.h:
-
-/usr/include/X11/ObjectP.h:
-
-/usr/include/X11/RectObjP.h:
-
-/usr/include/X11/StringDefs.h:
-
-/usr/include/X11/cursorfont.h:
-
-/usr/include/X11/Shell.h:
-
-/usr/include/X11/SM/SMlib.h:
-
-/usr/include/X11/SM/SM.h:
-
-/usr/include/X11/ICE/ICElib.h:
-
-/usr/include/X11/ICE/ICE.h:
-
-/usr/include/X11/Xaw/Form.h:
-
-/usr/include/X11/Xaw/Box.h:
-
-/usr/include/X11/Xmu/Converters.h:
-
-/usr/include/X11/Xaw/Command.h:
-
-/usr/include/X11/Xaw/Label.h:
-
-/usr/include/X11/Xaw/Simple.h:
-
-/usr/include/X11/Xaw/Toggle.h:
-
-/usr/include/X11/Xaw/Dialog.h:
-
-/usr/include/X11/Xaw/Scrollbar.h:
-
-/usr/include/X11/Xaw/Viewport.h:
-
-/usr/include/X11/Xaw/Reports.h:
-
-/usr/include/X11/Xaw/List.h:
-
-/usr/include/X11/Xaw/AsciiText.h:
-
-/usr/include/X11/Xaw/Text.h:
-
-/usr/include/X11/Xaw/TextSink.h:
-
-/usr/include/X11/Xaw/TextSrc.h:
-
-/usr/include/X11/Xaw/AsciiSrc.h:
-
-/usr/include/X11/Xaw/AsciiSink.h:
-
-/usr/include/X11/Xaw/MultiSrc.h:
-
-/usr/include/X11/Xaw/MenuButton.h:
-
-/usr/include/X11/Xaw/SimpleMenu.h:
-
-/usr/include/X11/Xaw/SmeBSB.h:
-
-/usr/include/X11/Xaw/Sme.h:
-
-/usr/include/X11/Xaw/SmeLine.h:
-
-interface/../SciPlot.h:
-
-/home/pierce/include/netcdf.h:
-
-/usr/include/errno.h:
-
-/usr/include/bits/errno.h:
-
-/usr/include/linux/errno.h:
-
-/usr/include/asm/errno.h:
-
-/usr/include/asm-generic/errno.h:
-
-/usr/include/asm-generic/errno-base.h:
-
-interface/../../config.h:
-
-interface/../ncview.defines.h:
-
-/home/pierce/include/udunits2.h:
-
-/home/pierce/include/converter.h:
-
-interface/../ncview.protos.h:
-
-interface/RadioWidget.h:
diff --git a/src/.deps/udu.Po b/src/.deps/udu.Po
deleted file mode 100644
index 92274e6..0000000
--- a/src/.deps/udu.Po
+++ /dev/null
@@ -1,289 +0,0 @@
-udu.o udu.o: udu.c ncview.includes.h /usr/include/stdio.h \
-  /usr/include/features.h /usr/include/sys/cdefs.h \
-  /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
-  /usr/include/gnu/stubs-64.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h \
-  /usr/include/bits/types.h /usr/include/bits/typesizes.h \
-  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h \
-  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
-  /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
-  /usr/include/endian.h /usr/include/bits/endian.h \
-  /usr/include/sys/select.h /usr/include/bits/select.h \
-  /usr/include/bits/sigset.h /usr/include/bits/time.h \
-  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
-  /usr/include/alloca.h /usr/include/dirent.h /usr/include/bits/dirent.h \
-  /usr/include/bits/posix1_lim.h /usr/include/bits/local_lim.h \
-  /usr/include/linux/limits.h /usr/include/sys/stat.h \
-  /usr/include/bits/stat.h /usr/include/fcntl.h /usr/include/bits/fcntl.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/limits.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/syslimits.h \
-  /usr/include/limits.h /usr/include/bits/posix2_lim.h \
-  /usr/include/math.h /usr/include/bits/huge_val.h \
-  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
-  /usr/include/unistd.h /usr/include/bits/posix_opt.h \
-  /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/ctype.h \
-  /usr/include/X11/Intrinsic.h /usr/include/X11/Xlib.h \
-  /usr/include/X11/X.h /usr/include/X11/Xfuncproto.h \
-  /usr/include/X11/Xosdefs.h /usr/include/X11/Xutil.h \
-  /usr/include/X11/keysym.h /usr/include/X11/keysymdef.h \
-  /usr/include/X11/Xresource.h /usr/include/string.h \
-  /usr/include/X11/Core.h /usr/include/X11/Composite.h \
-  /usr/include/X11/Constraint.h /usr/include/X11/Object.h \
-  /usr/include/X11/RectObj.h /usr/include/X11/IntrinsicP.h \
-  /usr/include/X11/CoreP.h /usr/include/X11/CompositeP.h \
-  /usr/include/X11/ConstrainP.h /usr/include/X11/ObjectP.h \
-  /usr/include/X11/RectObjP.h /usr/include/X11/StringDefs.h \
-  /usr/include/X11/cursorfont.h /usr/include/X11/Shell.h \
-  /usr/include/X11/SM/SMlib.h /usr/include/X11/SM/SM.h \
-  /usr/include/X11/ICE/ICElib.h /usr/include/X11/ICE/ICE.h \
-  /usr/include/X11/Xaw/Form.h /usr/include/X11/Xaw/Box.h \
-  /usr/include/X11/Xmu/Converters.h /usr/include/X11/Xaw/Command.h \
-  /usr/include/X11/Xaw/Label.h /usr/include/X11/Xaw/Simple.h \
-  /usr/include/X11/Xaw/Toggle.h /usr/include/X11/Xaw/Dialog.h \
-  /usr/include/X11/Xaw/Scrollbar.h /usr/include/X11/Xaw/Viewport.h \
-  /usr/include/X11/Xaw/Reports.h /usr/include/X11/Xaw/List.h \
-  /usr/include/X11/Xaw/AsciiText.h /usr/include/X11/Xaw/Text.h \
-  /usr/include/X11/Xaw/TextSink.h /usr/include/X11/Xaw/TextSrc.h \
-  /usr/include/X11/Xaw/AsciiSrc.h /usr/include/X11/Xaw/AsciiSink.h \
-  /usr/include/X11/Xaw/MultiSrc.h /usr/include/X11/Xaw/MenuButton.h \
-  /usr/include/X11/Xaw/SimpleMenu.h /usr/include/X11/Xaw/SmeBSB.h \
-  /usr/include/X11/Xaw/Sme.h /usr/include/X11/Xaw/SmeLine.h SciPlot.h \
-  /home/pierce/include/netcdf.h /usr/include/errno.h \
-  /usr/include/bits/errno.h /usr/include/linux/errno.h \
-  /usr/include/asm/errno.h /usr/include/asm-generic/errno.h \
-  /usr/include/asm-generic/errno-base.h ../config.h ncview.defines.h \
-  /home/pierce/include/udunits2.h /home/pierce/include/converter.h \
-  ncview.protos.h utCalendar2_cal.h
-
-ncview.includes.h:
-
-/usr/include/stdio.h:
-
-/usr/include/features.h:
-
-/usr/include/sys/cdefs.h:
-
-/usr/include/bits/wordsize.h:
-
-/usr/include/gnu/stubs.h:
-
-/usr/include/gnu/stubs-64.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h:
-
-/usr/include/bits/types.h:
-
-/usr/include/bits/typesizes.h:
-
-/usr/include/libio.h:
-
-/usr/include/_G_config.h:
-
-/usr/include/wchar.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h:
-
-/usr/include/bits/stdio_lim.h:
-
-/usr/include/bits/sys_errlist.h:
-
-/usr/include/stdlib.h:
-
-/usr/include/sys/types.h:
-
-/usr/include/time.h:
-
-/usr/include/endian.h:
-
-/usr/include/bits/endian.h:
-
-/usr/include/sys/select.h:
-
-/usr/include/bits/select.h:
-
-/usr/include/bits/sigset.h:
-
-/usr/include/bits/time.h:
-
-/usr/include/sys/sysmacros.h:
-
-/usr/include/bits/pthreadtypes.h:
-
-/usr/include/alloca.h:
-
-/usr/include/dirent.h:
-
-/usr/include/bits/dirent.h:
-
-/usr/include/bits/posix1_lim.h:
-
-/usr/include/bits/local_lim.h:
-
-/usr/include/linux/limits.h:
-
-/usr/include/sys/stat.h:
-
-/usr/include/bits/stat.h:
-
-/usr/include/fcntl.h:
-
-/usr/include/bits/fcntl.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/limits.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/syslimits.h:
-
-/usr/include/limits.h:
-
-/usr/include/bits/posix2_lim.h:
-
-/usr/include/math.h:
-
-/usr/include/bits/huge_val.h:
-
-/usr/include/bits/mathdef.h:
-
-/usr/include/bits/mathcalls.h:
-
-/usr/include/unistd.h:
-
-/usr/include/bits/posix_opt.h:
-
-/usr/include/bits/confname.h:
-
-/usr/include/getopt.h:
-
-/usr/include/ctype.h:
-
-/usr/include/X11/Intrinsic.h:
-
-/usr/include/X11/Xlib.h:
-
-/usr/include/X11/X.h:
-
-/usr/include/X11/Xfuncproto.h:
-
-/usr/include/X11/Xosdefs.h:
-
-/usr/include/X11/Xutil.h:
-
-/usr/include/X11/keysym.h:
-
-/usr/include/X11/keysymdef.h:
-
-/usr/include/X11/Xresource.h:
-
-/usr/include/string.h:
-
-/usr/include/X11/Core.h:
-
-/usr/include/X11/Composite.h:
-
-/usr/include/X11/Constraint.h:
-
-/usr/include/X11/Object.h:
-
-/usr/include/X11/RectObj.h:
-
-/usr/include/X11/IntrinsicP.h:
-
-/usr/include/X11/CoreP.h:
-
-/usr/include/X11/CompositeP.h:
-
-/usr/include/X11/ConstrainP.h:
-
-/usr/include/X11/ObjectP.h:
-
-/usr/include/X11/RectObjP.h:
-
-/usr/include/X11/StringDefs.h:
-
-/usr/include/X11/cursorfont.h:
-
-/usr/include/X11/Shell.h:
-
-/usr/include/X11/SM/SMlib.h:
-
-/usr/include/X11/SM/SM.h:
-
-/usr/include/X11/ICE/ICElib.h:
-
-/usr/include/X11/ICE/ICE.h:
-
-/usr/include/X11/Xaw/Form.h:
-
-/usr/include/X11/Xaw/Box.h:
-
-/usr/include/X11/Xmu/Converters.h:
-
-/usr/include/X11/Xaw/Command.h:
-
-/usr/include/X11/Xaw/Label.h:
-
-/usr/include/X11/Xaw/Simple.h:
-
-/usr/include/X11/Xaw/Toggle.h:
-
-/usr/include/X11/Xaw/Dialog.h:
-
-/usr/include/X11/Xaw/Scrollbar.h:
-
-/usr/include/X11/Xaw/Viewport.h:
-
-/usr/include/X11/Xaw/Reports.h:
-
-/usr/include/X11/Xaw/List.h:
-
-/usr/include/X11/Xaw/AsciiText.h:
-
-/usr/include/X11/Xaw/Text.h:
-
-/usr/include/X11/Xaw/TextSink.h:
-
-/usr/include/X11/Xaw/TextSrc.h:
-
-/usr/include/X11/Xaw/AsciiSrc.h:
-
-/usr/include/X11/Xaw/AsciiSink.h:
-
-/usr/include/X11/Xaw/MultiSrc.h:
-
-/usr/include/X11/Xaw/MenuButton.h:
-
-/usr/include/X11/Xaw/SimpleMenu.h:
-
-/usr/include/X11/Xaw/SmeBSB.h:
-
-/usr/include/X11/Xaw/Sme.h:
-
-/usr/include/X11/Xaw/SmeLine.h:
-
-SciPlot.h:
-
-/home/pierce/include/netcdf.h:
-
-/usr/include/errno.h:
-
-/usr/include/bits/errno.h:
-
-/usr/include/linux/errno.h:
-
-/usr/include/asm/errno.h:
-
-/usr/include/asm-generic/errno.h:
-
-/usr/include/asm-generic/errno-base.h:
-
-../config.h:
-
-ncview.defines.h:
-
-/home/pierce/include/udunits2.h:
-
-/home/pierce/include/converter.h:
-
-ncview.protos.h:
-
-utCalendar2_cal.h:
diff --git a/src/.deps/utCalendar2_cal.Po b/src/.deps/utCalendar2_cal.Po
deleted file mode 100644
index df6488f..0000000
--- a/src/.deps/utCalendar2_cal.Po
+++ /dev/null
@@ -1,93 +0,0 @@
-utCalendar2_cal.o utCalendar2_cal.o: utCalendar2_cal.c ../config.h \
-  /usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \
-  /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
-  /usr/include/gnu/stubs-64.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h \
-  /usr/include/bits/types.h /usr/include/bits/typesizes.h \
-  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h \
-  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
-  /usr/include/unistd.h /usr/include/bits/posix_opt.h \
-  /usr/include/bits/confname.h /usr/include/getopt.h \
-  /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
-  /usr/include/endian.h /usr/include/bits/endian.h \
-  /usr/include/sys/select.h /usr/include/bits/select.h \
-  /usr/include/bits/sigset.h /usr/include/bits/time.h \
-  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
-  /usr/include/alloca.h /usr/include/string.h \
-  /home/pierce/include/udunits2.h /home/pierce/include/converter.h \
-  calcalcs.h utCalendar2_cal.h
-
-../config.h:
-
-/usr/include/stdio.h:
-
-/usr/include/features.h:
-
-/usr/include/sys/cdefs.h:
-
-/usr/include/bits/wordsize.h:
-
-/usr/include/gnu/stubs.h:
-
-/usr/include/gnu/stubs-64.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h:
-
-/usr/include/bits/types.h:
-
-/usr/include/bits/typesizes.h:
-
-/usr/include/libio.h:
-
-/usr/include/_G_config.h:
-
-/usr/include/wchar.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h:
-
-/usr/include/bits/stdio_lim.h:
-
-/usr/include/bits/sys_errlist.h:
-
-/usr/include/unistd.h:
-
-/usr/include/bits/posix_opt.h:
-
-/usr/include/bits/confname.h:
-
-/usr/include/getopt.h:
-
-/usr/include/stdlib.h:
-
-/usr/include/sys/types.h:
-
-/usr/include/time.h:
-
-/usr/include/endian.h:
-
-/usr/include/bits/endian.h:
-
-/usr/include/sys/select.h:
-
-/usr/include/bits/select.h:
-
-/usr/include/bits/sigset.h:
-
-/usr/include/bits/time.h:
-
-/usr/include/sys/sysmacros.h:
-
-/usr/include/bits/pthreadtypes.h:
-
-/usr/include/alloca.h:
-
-/usr/include/string.h:
-
-/home/pierce/include/udunits2.h:
-
-/home/pierce/include/converter.h:
-
-calcalcs.h:
-
-utCalendar2_cal.h:
diff --git a/src/.deps/util.Po b/src/.deps/util.Po
deleted file mode 100644
index b3b37a7..0000000
--- a/src/.deps/util.Po
+++ /dev/null
@@ -1,292 +0,0 @@
-util.o util.o: util.c ncview.includes.h /usr/include/stdio.h \
-  /usr/include/features.h /usr/include/sys/cdefs.h \
-  /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
-  /usr/include/gnu/stubs-64.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h \
-  /usr/include/bits/types.h /usr/include/bits/typesizes.h \
-  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h \
-  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
-  /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
-  /usr/include/endian.h /usr/include/bits/endian.h \
-  /usr/include/sys/select.h /usr/include/bits/select.h \
-  /usr/include/bits/sigset.h /usr/include/bits/time.h \
-  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
-  /usr/include/alloca.h /usr/include/dirent.h /usr/include/bits/dirent.h \
-  /usr/include/bits/posix1_lim.h /usr/include/bits/local_lim.h \
-  /usr/include/linux/limits.h /usr/include/sys/stat.h \
-  /usr/include/bits/stat.h /usr/include/fcntl.h /usr/include/bits/fcntl.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/limits.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/syslimits.h \
-  /usr/include/limits.h /usr/include/bits/posix2_lim.h \
-  /usr/include/math.h /usr/include/bits/huge_val.h \
-  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
-  /usr/include/unistd.h /usr/include/bits/posix_opt.h \
-  /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/ctype.h \
-  /usr/include/X11/Intrinsic.h /usr/include/X11/Xlib.h \
-  /usr/include/X11/X.h /usr/include/X11/Xfuncproto.h \
-  /usr/include/X11/Xosdefs.h /usr/include/X11/Xutil.h \
-  /usr/include/X11/keysym.h /usr/include/X11/keysymdef.h \
-  /usr/include/X11/Xresource.h /usr/include/string.h \
-  /usr/include/X11/Core.h /usr/include/X11/Composite.h \
-  /usr/include/X11/Constraint.h /usr/include/X11/Object.h \
-  /usr/include/X11/RectObj.h /usr/include/X11/IntrinsicP.h \
-  /usr/include/X11/CoreP.h /usr/include/X11/CompositeP.h \
-  /usr/include/X11/ConstrainP.h /usr/include/X11/ObjectP.h \
-  /usr/include/X11/RectObjP.h /usr/include/X11/StringDefs.h \
-  /usr/include/X11/cursorfont.h /usr/include/X11/Shell.h \
-  /usr/include/X11/SM/SMlib.h /usr/include/X11/SM/SM.h \
-  /usr/include/X11/ICE/ICElib.h /usr/include/X11/ICE/ICE.h \
-  /usr/include/X11/Xaw/Form.h /usr/include/X11/Xaw/Box.h \
-  /usr/include/X11/Xmu/Converters.h /usr/include/X11/Xaw/Command.h \
-  /usr/include/X11/Xaw/Label.h /usr/include/X11/Xaw/Simple.h \
-  /usr/include/X11/Xaw/Toggle.h /usr/include/X11/Xaw/Dialog.h \
-  /usr/include/X11/Xaw/Scrollbar.h /usr/include/X11/Xaw/Viewport.h \
-  /usr/include/X11/Xaw/Reports.h /usr/include/X11/Xaw/List.h \
-  /usr/include/X11/Xaw/AsciiText.h /usr/include/X11/Xaw/Text.h \
-  /usr/include/X11/Xaw/TextSink.h /usr/include/X11/Xaw/TextSrc.h \
-  /usr/include/X11/Xaw/AsciiSrc.h /usr/include/X11/Xaw/AsciiSink.h \
-  /usr/include/X11/Xaw/MultiSrc.h /usr/include/X11/Xaw/MenuButton.h \
-  /usr/include/X11/Xaw/SimpleMenu.h /usr/include/X11/Xaw/SmeBSB.h \
-  /usr/include/X11/Xaw/Sme.h /usr/include/X11/Xaw/SmeLine.h SciPlot.h \
-  /home/pierce/include/netcdf.h /usr/include/errno.h \
-  /usr/include/bits/errno.h /usr/include/linux/errno.h \
-  /usr/include/asm/errno.h /usr/include/asm-generic/errno.h \
-  /usr/include/asm-generic/errno-base.h ../config.h ncview.defines.h \
-  /home/pierce/include/udunits2.h /home/pierce/include/converter.h \
-  ncview.protos.h /home/pierce/include/udunits.h \
-  /home/pierce/include/udunits2.h
-
-ncview.includes.h:
-
-/usr/include/stdio.h:
-
-/usr/include/features.h:
-
-/usr/include/sys/cdefs.h:
-
-/usr/include/bits/wordsize.h:
-
-/usr/include/gnu/stubs.h:
-
-/usr/include/gnu/stubs-64.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h:
-
-/usr/include/bits/types.h:
-
-/usr/include/bits/typesizes.h:
-
-/usr/include/libio.h:
-
-/usr/include/_G_config.h:
-
-/usr/include/wchar.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h:
-
-/usr/include/bits/stdio_lim.h:
-
-/usr/include/bits/sys_errlist.h:
-
-/usr/include/stdlib.h:
-
-/usr/include/sys/types.h:
-
-/usr/include/time.h:
-
-/usr/include/endian.h:
-
-/usr/include/bits/endian.h:
-
-/usr/include/sys/select.h:
-
-/usr/include/bits/select.h:
-
-/usr/include/bits/sigset.h:
-
-/usr/include/bits/time.h:
-
-/usr/include/sys/sysmacros.h:
-
-/usr/include/bits/pthreadtypes.h:
-
-/usr/include/alloca.h:
-
-/usr/include/dirent.h:
-
-/usr/include/bits/dirent.h:
-
-/usr/include/bits/posix1_lim.h:
-
-/usr/include/bits/local_lim.h:
-
-/usr/include/linux/limits.h:
-
-/usr/include/sys/stat.h:
-
-/usr/include/bits/stat.h:
-
-/usr/include/fcntl.h:
-
-/usr/include/bits/fcntl.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/limits.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/syslimits.h:
-
-/usr/include/limits.h:
-
-/usr/include/bits/posix2_lim.h:
-
-/usr/include/math.h:
-
-/usr/include/bits/huge_val.h:
-
-/usr/include/bits/mathdef.h:
-
-/usr/include/bits/mathcalls.h:
-
-/usr/include/unistd.h:
-
-/usr/include/bits/posix_opt.h:
-
-/usr/include/bits/confname.h:
-
-/usr/include/getopt.h:
-
-/usr/include/ctype.h:
-
-/usr/include/X11/Intrinsic.h:
-
-/usr/include/X11/Xlib.h:
-
-/usr/include/X11/X.h:
-
-/usr/include/X11/Xfuncproto.h:
-
-/usr/include/X11/Xosdefs.h:
-
-/usr/include/X11/Xutil.h:
-
-/usr/include/X11/keysym.h:
-
-/usr/include/X11/keysymdef.h:
-
-/usr/include/X11/Xresource.h:
-
-/usr/include/string.h:
-
-/usr/include/X11/Core.h:
-
-/usr/include/X11/Composite.h:
-
-/usr/include/X11/Constraint.h:
-
-/usr/include/X11/Object.h:
-
-/usr/include/X11/RectObj.h:
-
-/usr/include/X11/IntrinsicP.h:
-
-/usr/include/X11/CoreP.h:
-
-/usr/include/X11/CompositeP.h:
-
-/usr/include/X11/ConstrainP.h:
-
-/usr/include/X11/ObjectP.h:
-
-/usr/include/X11/RectObjP.h:
-
-/usr/include/X11/StringDefs.h:
-
-/usr/include/X11/cursorfont.h:
-
-/usr/include/X11/Shell.h:
-
-/usr/include/X11/SM/SMlib.h:
-
-/usr/include/X11/SM/SM.h:
-
-/usr/include/X11/ICE/ICElib.h:
-
-/usr/include/X11/ICE/ICE.h:
-
-/usr/include/X11/Xaw/Form.h:
-
-/usr/include/X11/Xaw/Box.h:
-
-/usr/include/X11/Xmu/Converters.h:
-
-/usr/include/X11/Xaw/Command.h:
-
-/usr/include/X11/Xaw/Label.h:
-
-/usr/include/X11/Xaw/Simple.h:
-
-/usr/include/X11/Xaw/Toggle.h:
-
-/usr/include/X11/Xaw/Dialog.h:
-
-/usr/include/X11/Xaw/Scrollbar.h:
-
-/usr/include/X11/Xaw/Viewport.h:
-
-/usr/include/X11/Xaw/Reports.h:
-
-/usr/include/X11/Xaw/List.h:
-
-/usr/include/X11/Xaw/AsciiText.h:
-
-/usr/include/X11/Xaw/Text.h:
-
-/usr/include/X11/Xaw/TextSink.h:
-
-/usr/include/X11/Xaw/TextSrc.h:
-
-/usr/include/X11/Xaw/AsciiSrc.h:
-
-/usr/include/X11/Xaw/AsciiSink.h:
-
-/usr/include/X11/Xaw/MultiSrc.h:
-
-/usr/include/X11/Xaw/MenuButton.h:
-
-/usr/include/X11/Xaw/SimpleMenu.h:
-
-/usr/include/X11/Xaw/SmeBSB.h:
-
-/usr/include/X11/Xaw/Sme.h:
-
-/usr/include/X11/Xaw/SmeLine.h:
-
-SciPlot.h:
-
-/home/pierce/include/netcdf.h:
-
-/usr/include/errno.h:
-
-/usr/include/bits/errno.h:
-
-/usr/include/linux/errno.h:
-
-/usr/include/asm/errno.h:
-
-/usr/include/asm-generic/errno.h:
-
-/usr/include/asm-generic/errno-base.h:
-
-../config.h:
-
-ncview.defines.h:
-
-/home/pierce/include/udunits2.h:
-
-/home/pierce/include/converter.h:
-
-ncview.protos.h:
-
-/home/pierce/include/udunits.h:
-
-/home/pierce/include/udunits2.h:
diff --git a/src/.deps/utils.Po b/src/.deps/utils.Po
deleted file mode 100644
index e043004..0000000
--- a/src/.deps/utils.Po
+++ /dev/null
@@ -1,288 +0,0 @@
-utils.o utils.o: interface/utils.c interface/../ncview.includes.h \
-  /usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \
-  /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
-  /usr/include/gnu/stubs-64.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h \
-  /usr/include/bits/types.h /usr/include/bits/typesizes.h \
-  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h \
-  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
-  /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
-  /usr/include/endian.h /usr/include/bits/endian.h \
-  /usr/include/sys/select.h /usr/include/bits/select.h \
-  /usr/include/bits/sigset.h /usr/include/bits/time.h \
-  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
-  /usr/include/alloca.h /usr/include/dirent.h /usr/include/bits/dirent.h \
-  /usr/include/bits/posix1_lim.h /usr/include/bits/local_lim.h \
-  /usr/include/linux/limits.h /usr/include/sys/stat.h \
-  /usr/include/bits/stat.h /usr/include/fcntl.h /usr/include/bits/fcntl.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/limits.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/syslimits.h \
-  /usr/include/limits.h /usr/include/bits/posix2_lim.h \
-  /usr/include/math.h /usr/include/bits/huge_val.h \
-  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
-  /usr/include/unistd.h /usr/include/bits/posix_opt.h \
-  /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/ctype.h \
-  /usr/include/X11/Intrinsic.h /usr/include/X11/Xlib.h \
-  /usr/include/X11/X.h /usr/include/X11/Xfuncproto.h \
-  /usr/include/X11/Xosdefs.h /usr/include/X11/Xutil.h \
-  /usr/include/X11/keysym.h /usr/include/X11/keysymdef.h \
-  /usr/include/X11/Xresource.h /usr/include/string.h \
-  /usr/include/X11/Core.h /usr/include/X11/Composite.h \
-  /usr/include/X11/Constraint.h /usr/include/X11/Object.h \
-  /usr/include/X11/RectObj.h /usr/include/X11/IntrinsicP.h \
-  /usr/include/X11/CoreP.h /usr/include/X11/CompositeP.h \
-  /usr/include/X11/ConstrainP.h /usr/include/X11/ObjectP.h \
-  /usr/include/X11/RectObjP.h /usr/include/X11/StringDefs.h \
-  /usr/include/X11/cursorfont.h /usr/include/X11/Shell.h \
-  /usr/include/X11/SM/SMlib.h /usr/include/X11/SM/SM.h \
-  /usr/include/X11/ICE/ICElib.h /usr/include/X11/ICE/ICE.h \
-  /usr/include/X11/Xaw/Form.h /usr/include/X11/Xaw/Box.h \
-  /usr/include/X11/Xmu/Converters.h /usr/include/X11/Xaw/Command.h \
-  /usr/include/X11/Xaw/Label.h /usr/include/X11/Xaw/Simple.h \
-  /usr/include/X11/Xaw/Toggle.h /usr/include/X11/Xaw/Dialog.h \
-  /usr/include/X11/Xaw/Scrollbar.h /usr/include/X11/Xaw/Viewport.h \
-  /usr/include/X11/Xaw/Reports.h /usr/include/X11/Xaw/List.h \
-  /usr/include/X11/Xaw/AsciiText.h /usr/include/X11/Xaw/Text.h \
-  /usr/include/X11/Xaw/TextSink.h /usr/include/X11/Xaw/TextSrc.h \
-  /usr/include/X11/Xaw/AsciiSrc.h /usr/include/X11/Xaw/AsciiSink.h \
-  /usr/include/X11/Xaw/MultiSrc.h /usr/include/X11/Xaw/MenuButton.h \
-  /usr/include/X11/Xaw/SimpleMenu.h /usr/include/X11/Xaw/SmeBSB.h \
-  /usr/include/X11/Xaw/Sme.h /usr/include/X11/Xaw/SmeLine.h \
-  interface/../SciPlot.h /home/pierce/include/netcdf.h \
-  /usr/include/errno.h /usr/include/bits/errno.h \
-  /usr/include/linux/errno.h /usr/include/asm/errno.h \
-  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
-  interface/../../config.h interface/../ncview.defines.h \
-  /home/pierce/include/udunits2.h /home/pierce/include/converter.h \
-  interface/../ncview.protos.h
-
-interface/../ncview.includes.h:
-
-/usr/include/stdio.h:
-
-/usr/include/features.h:
-
-/usr/include/sys/cdefs.h:
-
-/usr/include/bits/wordsize.h:
-
-/usr/include/gnu/stubs.h:
-
-/usr/include/gnu/stubs-64.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h:
-
-/usr/include/bits/types.h:
-
-/usr/include/bits/typesizes.h:
-
-/usr/include/libio.h:
-
-/usr/include/_G_config.h:
-
-/usr/include/wchar.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h:
-
-/usr/include/bits/stdio_lim.h:
-
-/usr/include/bits/sys_errlist.h:
-
-/usr/include/stdlib.h:
-
-/usr/include/sys/types.h:
-
-/usr/include/time.h:
-
-/usr/include/endian.h:
-
-/usr/include/bits/endian.h:
-
-/usr/include/sys/select.h:
-
-/usr/include/bits/select.h:
-
-/usr/include/bits/sigset.h:
-
-/usr/include/bits/time.h:
-
-/usr/include/sys/sysmacros.h:
-
-/usr/include/bits/pthreadtypes.h:
-
-/usr/include/alloca.h:
-
-/usr/include/dirent.h:
-
-/usr/include/bits/dirent.h:
-
-/usr/include/bits/posix1_lim.h:
-
-/usr/include/bits/local_lim.h:
-
-/usr/include/linux/limits.h:
-
-/usr/include/sys/stat.h:
-
-/usr/include/bits/stat.h:
-
-/usr/include/fcntl.h:
-
-/usr/include/bits/fcntl.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/limits.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/syslimits.h:
-
-/usr/include/limits.h:
-
-/usr/include/bits/posix2_lim.h:
-
-/usr/include/math.h:
-
-/usr/include/bits/huge_val.h:
-
-/usr/include/bits/mathdef.h:
-
-/usr/include/bits/mathcalls.h:
-
-/usr/include/unistd.h:
-
-/usr/include/bits/posix_opt.h:
-
-/usr/include/bits/confname.h:
-
-/usr/include/getopt.h:
-
-/usr/include/ctype.h:
-
-/usr/include/X11/Intrinsic.h:
-
-/usr/include/X11/Xlib.h:
-
-/usr/include/X11/X.h:
-
-/usr/include/X11/Xfuncproto.h:
-
-/usr/include/X11/Xosdefs.h:
-
-/usr/include/X11/Xutil.h:
-
-/usr/include/X11/keysym.h:
-
-/usr/include/X11/keysymdef.h:
-
-/usr/include/X11/Xresource.h:
-
-/usr/include/string.h:
-
-/usr/include/X11/Core.h:
-
-/usr/include/X11/Composite.h:
-
-/usr/include/X11/Constraint.h:
-
-/usr/include/X11/Object.h:
-
-/usr/include/X11/RectObj.h:
-
-/usr/include/X11/IntrinsicP.h:
-
-/usr/include/X11/CoreP.h:
-
-/usr/include/X11/CompositeP.h:
-
-/usr/include/X11/ConstrainP.h:
-
-/usr/include/X11/ObjectP.h:
-
-/usr/include/X11/RectObjP.h:
-
-/usr/include/X11/StringDefs.h:
-
-/usr/include/X11/cursorfont.h:
-
-/usr/include/X11/Shell.h:
-
-/usr/include/X11/SM/SMlib.h:
-
-/usr/include/X11/SM/SM.h:
-
-/usr/include/X11/ICE/ICElib.h:
-
-/usr/include/X11/ICE/ICE.h:
-
-/usr/include/X11/Xaw/Form.h:
-
-/usr/include/X11/Xaw/Box.h:
-
-/usr/include/X11/Xmu/Converters.h:
-
-/usr/include/X11/Xaw/Command.h:
-
-/usr/include/X11/Xaw/Label.h:
-
-/usr/include/X11/Xaw/Simple.h:
-
-/usr/include/X11/Xaw/Toggle.h:
-
-/usr/include/X11/Xaw/Dialog.h:
-
-/usr/include/X11/Xaw/Scrollbar.h:
-
-/usr/include/X11/Xaw/Viewport.h:
-
-/usr/include/X11/Xaw/Reports.h:
-
-/usr/include/X11/Xaw/List.h:
-
-/usr/include/X11/Xaw/AsciiText.h:
-
-/usr/include/X11/Xaw/Text.h:
-
-/usr/include/X11/Xaw/TextSink.h:
-
-/usr/include/X11/Xaw/TextSrc.h:
-
-/usr/include/X11/Xaw/AsciiSrc.h:
-
-/usr/include/X11/Xaw/AsciiSink.h:
-
-/usr/include/X11/Xaw/MultiSrc.h:
-
-/usr/include/X11/Xaw/MenuButton.h:
-
-/usr/include/X11/Xaw/SimpleMenu.h:
-
-/usr/include/X11/Xaw/SmeBSB.h:
-
-/usr/include/X11/Xaw/Sme.h:
-
-/usr/include/X11/Xaw/SmeLine.h:
-
-interface/../SciPlot.h:
-
-/home/pierce/include/netcdf.h:
-
-/usr/include/errno.h:
-
-/usr/include/bits/errno.h:
-
-/usr/include/linux/errno.h:
-
-/usr/include/asm/errno.h:
-
-/usr/include/asm-generic/errno.h:
-
-/usr/include/asm-generic/errno-base.h:
-
-interface/../../config.h:
-
-interface/../ncview.defines.h:
-
-/home/pierce/include/udunits2.h:
-
-/home/pierce/include/converter.h:
-
-interface/../ncview.protos.h:
diff --git a/src/.deps/view.Po b/src/.deps/view.Po
deleted file mode 100644
index c3c910c..0000000
--- a/src/.deps/view.Po
+++ /dev/null
@@ -1,287 +0,0 @@
-view.o view.o: view.c ncview.includes.h /usr/include/stdio.h \
-  /usr/include/features.h /usr/include/sys/cdefs.h \
-  /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
-  /usr/include/gnu/stubs-64.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h \
-  /usr/include/bits/types.h /usr/include/bits/typesizes.h \
-  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h \
-  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
-  /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
-  /usr/include/endian.h /usr/include/bits/endian.h \
-  /usr/include/sys/select.h /usr/include/bits/select.h \
-  /usr/include/bits/sigset.h /usr/include/bits/time.h \
-  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
-  /usr/include/alloca.h /usr/include/dirent.h /usr/include/bits/dirent.h \
-  /usr/include/bits/posix1_lim.h /usr/include/bits/local_lim.h \
-  /usr/include/linux/limits.h /usr/include/sys/stat.h \
-  /usr/include/bits/stat.h /usr/include/fcntl.h /usr/include/bits/fcntl.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/limits.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/syslimits.h \
-  /usr/include/limits.h /usr/include/bits/posix2_lim.h \
-  /usr/include/math.h /usr/include/bits/huge_val.h \
-  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
-  /usr/include/unistd.h /usr/include/bits/posix_opt.h \
-  /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/ctype.h \
-  /usr/include/X11/Intrinsic.h /usr/include/X11/Xlib.h \
-  /usr/include/X11/X.h /usr/include/X11/Xfuncproto.h \
-  /usr/include/X11/Xosdefs.h /usr/include/X11/Xutil.h \
-  /usr/include/X11/keysym.h /usr/include/X11/keysymdef.h \
-  /usr/include/X11/Xresource.h /usr/include/string.h \
-  /usr/include/X11/Core.h /usr/include/X11/Composite.h \
-  /usr/include/X11/Constraint.h /usr/include/X11/Object.h \
-  /usr/include/X11/RectObj.h /usr/include/X11/IntrinsicP.h \
-  /usr/include/X11/CoreP.h /usr/include/X11/CompositeP.h \
-  /usr/include/X11/ConstrainP.h /usr/include/X11/ObjectP.h \
-  /usr/include/X11/RectObjP.h /usr/include/X11/StringDefs.h \
-  /usr/include/X11/cursorfont.h /usr/include/X11/Shell.h \
-  /usr/include/X11/SM/SMlib.h /usr/include/X11/SM/SM.h \
-  /usr/include/X11/ICE/ICElib.h /usr/include/X11/ICE/ICE.h \
-  /usr/include/X11/Xaw/Form.h /usr/include/X11/Xaw/Box.h \
-  /usr/include/X11/Xmu/Converters.h /usr/include/X11/Xaw/Command.h \
-  /usr/include/X11/Xaw/Label.h /usr/include/X11/Xaw/Simple.h \
-  /usr/include/X11/Xaw/Toggle.h /usr/include/X11/Xaw/Dialog.h \
-  /usr/include/X11/Xaw/Scrollbar.h /usr/include/X11/Xaw/Viewport.h \
-  /usr/include/X11/Xaw/Reports.h /usr/include/X11/Xaw/List.h \
-  /usr/include/X11/Xaw/AsciiText.h /usr/include/X11/Xaw/Text.h \
-  /usr/include/X11/Xaw/TextSink.h /usr/include/X11/Xaw/TextSrc.h \
-  /usr/include/X11/Xaw/AsciiSrc.h /usr/include/X11/Xaw/AsciiSink.h \
-  /usr/include/X11/Xaw/MultiSrc.h /usr/include/X11/Xaw/MenuButton.h \
-  /usr/include/X11/Xaw/SimpleMenu.h /usr/include/X11/Xaw/SmeBSB.h \
-  /usr/include/X11/Xaw/Sme.h /usr/include/X11/Xaw/SmeLine.h SciPlot.h \
-  /home/pierce/include/netcdf.h /usr/include/errno.h \
-  /usr/include/bits/errno.h /usr/include/linux/errno.h \
-  /usr/include/asm/errno.h /usr/include/asm-generic/errno.h \
-  /usr/include/asm-generic/errno-base.h ../config.h ncview.defines.h \
-  /home/pierce/include/udunits2.h /home/pierce/include/converter.h \
-  ncview.protos.h
-
-ncview.includes.h:
-
-/usr/include/stdio.h:
-
-/usr/include/features.h:
-
-/usr/include/sys/cdefs.h:
-
-/usr/include/bits/wordsize.h:
-
-/usr/include/gnu/stubs.h:
-
-/usr/include/gnu/stubs-64.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h:
-
-/usr/include/bits/types.h:
-
-/usr/include/bits/typesizes.h:
-
-/usr/include/libio.h:
-
-/usr/include/_G_config.h:
-
-/usr/include/wchar.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h:
-
-/usr/include/bits/stdio_lim.h:
-
-/usr/include/bits/sys_errlist.h:
-
-/usr/include/stdlib.h:
-
-/usr/include/sys/types.h:
-
-/usr/include/time.h:
-
-/usr/include/endian.h:
-
-/usr/include/bits/endian.h:
-
-/usr/include/sys/select.h:
-
-/usr/include/bits/select.h:
-
-/usr/include/bits/sigset.h:
-
-/usr/include/bits/time.h:
-
-/usr/include/sys/sysmacros.h:
-
-/usr/include/bits/pthreadtypes.h:
-
-/usr/include/alloca.h:
-
-/usr/include/dirent.h:
-
-/usr/include/bits/dirent.h:
-
-/usr/include/bits/posix1_lim.h:
-
-/usr/include/bits/local_lim.h:
-
-/usr/include/linux/limits.h:
-
-/usr/include/sys/stat.h:
-
-/usr/include/bits/stat.h:
-
-/usr/include/fcntl.h:
-
-/usr/include/bits/fcntl.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/limits.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/syslimits.h:
-
-/usr/include/limits.h:
-
-/usr/include/bits/posix2_lim.h:
-
-/usr/include/math.h:
-
-/usr/include/bits/huge_val.h:
-
-/usr/include/bits/mathdef.h:
-
-/usr/include/bits/mathcalls.h:
-
-/usr/include/unistd.h:
-
-/usr/include/bits/posix_opt.h:
-
-/usr/include/bits/confname.h:
-
-/usr/include/getopt.h:
-
-/usr/include/ctype.h:
-
-/usr/include/X11/Intrinsic.h:
-
-/usr/include/X11/Xlib.h:
-
-/usr/include/X11/X.h:
-
-/usr/include/X11/Xfuncproto.h:
-
-/usr/include/X11/Xosdefs.h:
-
-/usr/include/X11/Xutil.h:
-
-/usr/include/X11/keysym.h:
-
-/usr/include/X11/keysymdef.h:
-
-/usr/include/X11/Xresource.h:
-
-/usr/include/string.h:
-
-/usr/include/X11/Core.h:
-
-/usr/include/X11/Composite.h:
-
-/usr/include/X11/Constraint.h:
-
-/usr/include/X11/Object.h:
-
-/usr/include/X11/RectObj.h:
-
-/usr/include/X11/IntrinsicP.h:
-
-/usr/include/X11/CoreP.h:
-
-/usr/include/X11/CompositeP.h:
-
-/usr/include/X11/ConstrainP.h:
-
-/usr/include/X11/ObjectP.h:
-
-/usr/include/X11/RectObjP.h:
-
-/usr/include/X11/StringDefs.h:
-
-/usr/include/X11/cursorfont.h:
-
-/usr/include/X11/Shell.h:
-
-/usr/include/X11/SM/SMlib.h:
-
-/usr/include/X11/SM/SM.h:
-
-/usr/include/X11/ICE/ICElib.h:
-
-/usr/include/X11/ICE/ICE.h:
-
-/usr/include/X11/Xaw/Form.h:
-
-/usr/include/X11/Xaw/Box.h:
-
-/usr/include/X11/Xmu/Converters.h:
-
-/usr/include/X11/Xaw/Command.h:
-
-/usr/include/X11/Xaw/Label.h:
-
-/usr/include/X11/Xaw/Simple.h:
-
-/usr/include/X11/Xaw/Toggle.h:
-
-/usr/include/X11/Xaw/Dialog.h:
-
-/usr/include/X11/Xaw/Scrollbar.h:
-
-/usr/include/X11/Xaw/Viewport.h:
-
-/usr/include/X11/Xaw/Reports.h:
-
-/usr/include/X11/Xaw/List.h:
-
-/usr/include/X11/Xaw/AsciiText.h:
-
-/usr/include/X11/Xaw/Text.h:
-
-/usr/include/X11/Xaw/TextSink.h:
-
-/usr/include/X11/Xaw/TextSrc.h:
-
-/usr/include/X11/Xaw/AsciiSrc.h:
-
-/usr/include/X11/Xaw/AsciiSink.h:
-
-/usr/include/X11/Xaw/MultiSrc.h:
-
-/usr/include/X11/Xaw/MenuButton.h:
-
-/usr/include/X11/Xaw/SimpleMenu.h:
-
-/usr/include/X11/Xaw/SmeBSB.h:
-
-/usr/include/X11/Xaw/Sme.h:
-
-/usr/include/X11/Xaw/SmeLine.h:
-
-SciPlot.h:
-
-/home/pierce/include/netcdf.h:
-
-/usr/include/errno.h:
-
-/usr/include/bits/errno.h:
-
-/usr/include/linux/errno.h:
-
-/usr/include/asm/errno.h:
-
-/usr/include/asm-generic/errno.h:
-
-/usr/include/asm-generic/errno-base.h:
-
-../config.h:
-
-ncview.defines.h:
-
-/home/pierce/include/udunits2.h:
-
-/home/pierce/include/converter.h:
-
-ncview.protos.h:
diff --git a/src/.deps/x_interface.Po b/src/.deps/x_interface.Po
deleted file mode 100644
index 7b5cd27..0000000
--- a/src/.deps/x_interface.Po
+++ /dev/null
@@ -1,300 +0,0 @@
-x_interface.o x_interface.o: interface/x_interface.c \
-  interface/../ncview.includes.h /usr/include/stdio.h \
-  /usr/include/features.h /usr/include/sys/cdefs.h \
-  /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
-  /usr/include/gnu/stubs-64.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h \
-  /usr/include/bits/types.h /usr/include/bits/typesizes.h \
-  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h \
-  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
-  /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
-  /usr/include/endian.h /usr/include/bits/endian.h \
-  /usr/include/sys/select.h /usr/include/bits/select.h \
-  /usr/include/bits/sigset.h /usr/include/bits/time.h \
-  /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
-  /usr/include/alloca.h /usr/include/dirent.h /usr/include/bits/dirent.h \
-  /usr/include/bits/posix1_lim.h /usr/include/bits/local_lim.h \
-  /usr/include/linux/limits.h /usr/include/sys/stat.h \
-  /usr/include/bits/stat.h /usr/include/fcntl.h /usr/include/bits/fcntl.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/limits.h \
-  /usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/syslimits.h \
-  /usr/include/limits.h /usr/include/bits/posix2_lim.h \
-  /usr/include/math.h /usr/include/bits/huge_val.h \
-  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
-  /usr/include/unistd.h /usr/include/bits/posix_opt.h \
-  /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/ctype.h \
-  /usr/include/X11/Intrinsic.h /usr/include/X11/Xlib.h \
-  /usr/include/X11/X.h /usr/include/X11/Xfuncproto.h \
-  /usr/include/X11/Xosdefs.h /usr/include/X11/Xutil.h \
-  /usr/include/X11/keysym.h /usr/include/X11/keysymdef.h \
-  /usr/include/X11/Xresource.h /usr/include/string.h \
-  /usr/include/X11/Core.h /usr/include/X11/Composite.h \
-  /usr/include/X11/Constraint.h /usr/include/X11/Object.h \
-  /usr/include/X11/RectObj.h /usr/include/X11/IntrinsicP.h \
-  /usr/include/X11/CoreP.h /usr/include/X11/CompositeP.h \
-  /usr/include/X11/ConstrainP.h /usr/include/X11/ObjectP.h \
-  /usr/include/X11/RectObjP.h /usr/include/X11/StringDefs.h \
-  /usr/include/X11/cursorfont.h /usr/include/X11/Shell.h \
-  /usr/include/X11/SM/SMlib.h /usr/include/X11/SM/SM.h \
-  /usr/include/X11/ICE/ICElib.h /usr/include/X11/ICE/ICE.h \
-  /usr/include/X11/Xaw/Form.h /usr/include/X11/Xaw/Box.h \
-  /usr/include/X11/Xmu/Converters.h /usr/include/X11/Xaw/Command.h \
-  /usr/include/X11/Xaw/Label.h /usr/include/X11/Xaw/Simple.h \
-  /usr/include/X11/Xaw/Toggle.h /usr/include/X11/Xaw/Dialog.h \
-  /usr/include/X11/Xaw/Scrollbar.h /usr/include/X11/Xaw/Viewport.h \
-  /usr/include/X11/Xaw/Reports.h /usr/include/X11/Xaw/List.h \
-  /usr/include/X11/Xaw/AsciiText.h /usr/include/X11/Xaw/Text.h \
-  /usr/include/X11/Xaw/TextSink.h /usr/include/X11/Xaw/TextSrc.h \
-  /usr/include/X11/Xaw/AsciiSrc.h /usr/include/X11/Xaw/AsciiSink.h \
-  /usr/include/X11/Xaw/MultiSrc.h /usr/include/X11/Xaw/MenuButton.h \
-  /usr/include/X11/Xaw/SimpleMenu.h /usr/include/X11/Xaw/SmeBSB.h \
-  /usr/include/X11/Xaw/Sme.h /usr/include/X11/Xaw/SmeLine.h \
-  interface/../SciPlot.h /home/pierce/include/netcdf.h \
-  /usr/include/errno.h /usr/include/bits/errno.h \
-  /usr/include/linux/errno.h /usr/include/asm/errno.h \
-  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
-  interface/../../config.h interface/../ncview.defines.h \
-  /home/pierce/include/udunits2.h /home/pierce/include/converter.h \
-  interface/../ncview.protos.h interface/../ncview.bitmaps.h \
-  interface/../interface/open_circle_bitmap.h \
-  interface/../interface/closed_circle_bitmap.h \
-  interface/fallback_resources.h
-
-interface/../ncview.includes.h:
-
-/usr/include/stdio.h:
-
-/usr/include/features.h:
-
-/usr/include/sys/cdefs.h:
-
-/usr/include/bits/wordsize.h:
-
-/usr/include/gnu/stubs.h:
-
-/usr/include/gnu/stubs-64.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stddef.h:
-
-/usr/include/bits/types.h:
-
-/usr/include/bits/typesizes.h:
-
-/usr/include/libio.h:
-
-/usr/include/_G_config.h:
-
-/usr/include/wchar.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/stdarg.h:
-
-/usr/include/bits/stdio_lim.h:
-
-/usr/include/bits/sys_errlist.h:
-
-/usr/include/stdlib.h:
-
-/usr/include/sys/types.h:
-
-/usr/include/time.h:
-
-/usr/include/endian.h:
-
-/usr/include/bits/endian.h:
-
-/usr/include/sys/select.h:
-
-/usr/include/bits/select.h:
-
-/usr/include/bits/sigset.h:
-
-/usr/include/bits/time.h:
-
-/usr/include/sys/sysmacros.h:
-
-/usr/include/bits/pthreadtypes.h:
-
-/usr/include/alloca.h:
-
-/usr/include/dirent.h:
-
-/usr/include/bits/dirent.h:
-
-/usr/include/bits/posix1_lim.h:
-
-/usr/include/bits/local_lim.h:
-
-/usr/include/linux/limits.h:
-
-/usr/include/sys/stat.h:
-
-/usr/include/bits/stat.h:
-
-/usr/include/fcntl.h:
-
-/usr/include/bits/fcntl.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/limits.h:
-
-/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include/syslimits.h:
-
-/usr/include/limits.h:
-
-/usr/include/bits/posix2_lim.h:
-
-/usr/include/math.h:
-
-/usr/include/bits/huge_val.h:
-
-/usr/include/bits/mathdef.h:
-
-/usr/include/bits/mathcalls.h:
-
-/usr/include/unistd.h:
-
-/usr/include/bits/posix_opt.h:
-
-/usr/include/bits/confname.h:
-
-/usr/include/getopt.h:
-
-/usr/include/ctype.h:
-
-/usr/include/X11/Intrinsic.h:
-
-/usr/include/X11/Xlib.h:
-
-/usr/include/X11/X.h:
-
-/usr/include/X11/Xfuncproto.h:
-
-/usr/include/X11/Xosdefs.h:
-
-/usr/include/X11/Xutil.h:
-
-/usr/include/X11/keysym.h:
-
-/usr/include/X11/keysymdef.h:
-
-/usr/include/X11/Xresource.h:
-
-/usr/include/string.h:
-
-/usr/include/X11/Core.h:
-
-/usr/include/X11/Composite.h:
-
-/usr/include/X11/Constraint.h:
-
-/usr/include/X11/Object.h:
-
-/usr/include/X11/RectObj.h:
-
-/usr/include/X11/IntrinsicP.h:
-
-/usr/include/X11/CoreP.h:
-
-/usr/include/X11/CompositeP.h:
-
-/usr/include/X11/ConstrainP.h:
-
-/usr/include/X11/ObjectP.h:
-
-/usr/include/X11/RectObjP.h:
-
-/usr/include/X11/StringDefs.h:
-
-/usr/include/X11/cursorfont.h:
-
-/usr/include/X11/Shell.h:
-
-/usr/include/X11/SM/SMlib.h:
-
-/usr/include/X11/SM/SM.h:
-
-/usr/include/X11/ICE/ICElib.h:
-
-/usr/include/X11/ICE/ICE.h:
-
-/usr/include/X11/Xaw/Form.h:
-
-/usr/include/X11/Xaw/Box.h:
-
-/usr/include/X11/Xmu/Converters.h:
-
-/usr/include/X11/Xaw/Command.h:
-
-/usr/include/X11/Xaw/Label.h:
-
-/usr/include/X11/Xaw/Simple.h:
-
-/usr/include/X11/Xaw/Toggle.h:
-
-/usr/include/X11/Xaw/Dialog.h:
-
-/usr/include/X11/Xaw/Scrollbar.h:
-
-/usr/include/X11/Xaw/Viewport.h:
-
-/usr/include/X11/Xaw/Reports.h:
-
-/usr/include/X11/Xaw/List.h:
-
-/usr/include/X11/Xaw/AsciiText.h:
-
-/usr/include/X11/Xaw/Text.h:
-
-/usr/include/X11/Xaw/TextSink.h:
-
-/usr/include/X11/Xaw/TextSrc.h:
-
-/usr/include/X11/Xaw/AsciiSrc.h:
-
-/usr/include/X11/Xaw/AsciiSink.h:
-
-/usr/include/X11/Xaw/MultiSrc.h:
-
-/usr/include/X11/Xaw/MenuButton.h:
-
-/usr/include/X11/Xaw/SimpleMenu.h:
-
-/usr/include/X11/Xaw/SmeBSB.h:
-
-/usr/include/X11/Xaw/Sme.h:
-
-/usr/include/X11/Xaw/SmeLine.h:
-
-interface/../SciPlot.h:
-
-/home/pierce/include/netcdf.h:
-
-/usr/include/errno.h:
-
-/usr/include/bits/errno.h:
-
-/usr/include/linux/errno.h:
-
-/usr/include/asm/errno.h:
-
-/usr/include/asm-generic/errno.h:
-
-/usr/include/asm-generic/errno-base.h:
-
-interface/../../config.h:
-
-interface/../ncview.defines.h:
-
-/home/pierce/include/udunits2.h:
-
-/home/pierce/include/converter.h:
-
-interface/../ncview.protos.h:
-
-interface/../ncview.bitmaps.h:
-
-interface/../interface/open_circle_bitmap.h:
-
-interface/../interface/closed_circle_bitmap.h:
-
-interface/fallback_resources.h:
diff --git a/src/.overlay.c.swp b/src/.overlay.c.swp
deleted file mode 100644
index c75c224..0000000
Binary files a/src/.overlay.c.swp and /dev/null differ
diff --git a/src/Makefile b/src/Makefile
deleted file mode 100644
index ecb27cf..0000000
--- a/src/Makefile
+++ /dev/null
@@ -1,703 +0,0 @@
-# Makefile.in generated by automake 1.10.1 from Makefile.am.
-# src/Makefile.  Generated from Makefile.in by configure.
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-
-
-pkgdatadir = $(datadir)/ncview
-pkglibdir = $(libdir)/ncview
-pkgincludedir = $(includedir)/ncview
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-bin_PROGRAMS = ncview$(EXEEXT)
-noinst_PROGRAMS = geteuid$(EXEEXT)
-subdir = src
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4macros/netcdf.m4 \
-	$(top_srcdir)/m4macros/ppm.m4 \
-	$(top_srcdir)/m4macros/udunits2.m4 $(top_srcdir)/configure.in
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-am__installdirs = "$(DESTDIR)$(bindir)"
-binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
-PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
-am_geteuid_OBJECTS = geteuid.$(OBJEXT)
-geteuid_OBJECTS = $(am_geteuid_OBJECTS)
-geteuid_LDADD = $(LDADD)
-am__objects_1 =
-am__objects_2 = ncview.$(OBJEXT) file.$(OBJEXT) util.$(OBJEXT) \
-	do_buttons.$(OBJEXT) file_netcdf.$(OBJEXT) view.$(OBJEXT) \
-	do_print.$(OBJEXT) epic_time.$(OBJEXT) interface.$(OBJEXT) \
-	x_interface.$(OBJEXT) dataedit.$(OBJEXT) \
-	display_info.$(OBJEXT) plot_xy.$(OBJEXT) utils.$(OBJEXT) \
-	range.$(OBJEXT) printer_options.$(OBJEXT) overlay.$(OBJEXT) \
-	filesel.$(OBJEXT) set_options.$(OBJEXT) plot_range.$(OBJEXT) \
-	udu.$(OBJEXT) SciPlot.$(OBJEXT) RadioWidget.$(OBJEXT) \
-	cbar.$(OBJEXT) utCalendar2_cal.$(OBJEXT) calcalcs.$(OBJEXT)
-am_ncview_OBJECTS = $(am__objects_1) $(am__objects_2)
-ncview_OBJECTS = $(am_ncview_OBJECTS)
-am__DEPENDENCIES_1 =
-ncview_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = -I. -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
-	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(geteuid_SOURCES) $(ncview_SOURCES)
-DIST_SOURCES = $(geteuid_SOURCES) $(ncview_SOURCES)
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = ${SHELL} /home/pierce/src/mine/ncview/ncview-2.0beta3/missing --run aclocal-1.10
-AMTAR = ${SHELL} /home/pierce/src/mine/ncview/ncview-2.0beta3/missing --run tar
-AUTOCONF = ${SHELL} /home/pierce/src/mine/ncview/ncview-2.0beta3/missing --run autoconf
-AUTOHEADER = ${SHELL} /home/pierce/src/mine/ncview/ncview-2.0beta3/missing --run autoheader
-AUTOMAKE = ${SHELL} /home/pierce/src/mine/ncview/ncview-2.0beta3/missing --run automake-1.10
-AWK = mawk
-CC = cc
-CCDEPMODE = depmode=gcc3
-CFLAGS = 
-CPP = cc -E
-CPPFLAGS = 
-CYGPATH_W = echo
-DEFS = -DHAVE_CONFIG_H
-DEPDIR = .deps
-DO_PPM_INCDIR = #PPMINCDIR = -I
-DO_PPM_LIBDIR = #PPMLIBDIR = -I
-DO_PPM_LIBNAME = #PPMLIB = -lnetpbm
-DO_PPM_LINE = #INC_PPM   = -DINC_PPM
-DO_UDUNITS2_INCDIR = UDUNITS2INCDIR = -I/home/pierce/include
-DO_UDUNITS2_LIBDIR = UDUNITS2LIBDIR = -L/home/pierce/lib
-DO_UDUNITS2_LIBNAME = UDUNITS2LIB = -ludunits2
-DO_UDUNITS2_LINE = INC_UDUNITS2   = -DINC_UDUNITS2
-ECHO_C = 
-ECHO_N = -n
-ECHO_T = 
-EGREP = /bin/grep -E
-EXEEXT = 
-GREP = /bin/grep
-HAS_NC_CONFIG = yes
-INSTALL = /usr/bin/install -c
-INSTALL_DATA = ${INSTALL} -m 644
-INSTALL_PROGRAM = ${INSTALL}
-INSTALL_SCRIPT = ${INSTALL}
-INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
-LDFLAGS = 
-LIBOBJS = 
-LIBS = 
-LTLIBOBJS = 
-MAKEINFO = ${SHELL} /home/pierce/src/mine/ncview/ncview-2.0beta3/missing --run makeinfo
-MKDIR_P = /bin/mkdir -p
-NETCDF_CC = cc
-NETCDF_CPPFLAGS = -I/home/pierce/include
-NETCDF_LDFLAGS = -L/home/pierce/lib -lnetcdf -L/home/pierce/lib -lhdf5_hl -lhdf5 -lz -lm
-NETCDF_LIBS = 
-NETCDF_VERSION = netCDF 4.1-beta2
-OBJEXT = o
-PACKAGE = ncview
-PACKAGE_BUGREPORT = dpierce at ucsd.edu
-PACKAGE_NAME = ncview
-PACKAGE_STRING = ncview 2.0.0
-PACKAGE_TARNAME = ncview
-PACKAGE_VERSION = 2.0.0
-PATH_SEPARATOR = :
-PPM_INCDIR = 
-PPM_LIBDIR = 
-PPM_LIBNAME = netpbm
-PREFIX = /home/pierce
-RPATH_FLAGS =  -Wl,-R,/home/pierce/lib -Wl,-R,/home/pierce/lib -Wl,-R,/home/pierce/lib -Wl,-R,/home/pierce/lib
-SET_MAKE = 
-SHELL = /bin/bash
-STRIP = 
-UDUNITS2_CPPFLAGS = -I/home/pierce/include
-UDUNITS2_LDFLAGS = -L/home/pierce/lib -ludunits2 -lexpat -L/home/pierce/lib -ludunits2
-UDUNITS2_LIBS = -ludunits2
-VERSION = 2.0.0
-X11_LIBS = -lX11 
-XAW_LIBS = -lXaw -lXt 
-XMKMF = 
-X_CFLAGS = 
-X_EXTRA_LIBS = 
-X_INCLUDES = 
-X_LIBS = 
-X_PRE_LIBS =  -lSM -lICE
-abs_builddir = /home/pierce/src/mine/ncview/ncview-2.0beta3/src
-abs_srcdir = /home/pierce/src/mine/ncview/ncview-2.0beta3/src
-abs_top_builddir = /home/pierce/src/mine/ncview/ncview-2.0beta3
-abs_top_srcdir = /home/pierce/src/mine/ncview/ncview-2.0beta3
-ac_ct_CC = cc
-am__include = include
-am__leading_dot = .
-am__quote = 
-am__tar = ${AMTAR} chof - "$$tardir"
-am__untar = ${AMTAR} xf -
-bindir = ${exec_prefix}/bin
-build_alias = 
-builddir = .
-datadir = ${datarootdir}
-datarootdir = ${prefix}/share
-docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
-dvidir = ${docdir}
-exec_prefix = ${prefix}
-host_alias = 
-htmldir = ${docdir}
-includedir = ${prefix}/include
-infodir = ${datarootdir}/info
-install_sh = $(SHELL) /home/pierce/src/mine/ncview/ncview-2.0beta3/install-sh
-libdir = ${exec_prefix}/lib
-libexecdir = ${exec_prefix}/libexec
-localedir = ${datarootdir}/locale
-localstatedir = ${prefix}/var
-mandir = ${datarootdir}/man
-mkdir_p = /bin/mkdir -p
-oldincludedir = /usr/include
-pdfdir = ${docdir}
-prefix = /home/pierce
-program_transform_name = s,x,x,
-psdir = ${docdir}
-sbindir = ${exec_prefix}/sbin
-sharedstatedir = ${prefix}/com
-srcdir = .
-sysconfdir = ${prefix}/etc
-target_alias = 
-top_builddir = ..
-top_srcdir = ..
-geteuid_SOURCES = geteuid.c
-ncview_SOURCES = $(headers) $(sources)
-ncview_LDADD = $(PPM_LIBS) $(UDUNITS2_LDFLAGS) -lm $(NETCDF_LDFLAGS) $(XAW_LIBS) $(X_PRE_LIBS) $(X_LIBS) $(X11_LIBS) $(X_EXTRA_LIBS)
-headers = ncview.bitmaps.h ncview.includes.h             \
-          ncview.defines.h ncview.protos.h               \
-          utCalendar2_cal.h SciPlot.h SciPlotP.h 	 \
-          colormaps_3gauss.h colormaps_bw.h              \
-          colormaps_detail.h colormaps_helix2.h          \
-          colormaps_hotres.h colormaps_3saw.h            \
-          colormaps_default.h colormaps_extrema.h        \
-          colormaps_helix.h colormaps_ssec.h             \
-          overlay_coasts_p08deg.h overlay_coasts_p8deg.h \
-          overlay_usa.h interface/closed_circle_bitmap.h \
-          interface/open_circle_bitmap.h \
-          interface/fallback_resources.h interface/RadioWidget.h \
-          interface/helvR08.h interface/widgets.h 	\
-	  calcalcs.h
-
-sources = ncview.c file.c util.c do_buttons.c             \
-          file_netcdf.c   view.c do_print.c               \
-          epic_time.c interface/interface.c               \
-          interface/x_interface.c interface/dataedit.c    \
-          interface/display_info.c interface/plot_xy.c    \
-          interface/utils.c interface/range.c             \
-          interface/printer_options.c overlay.c           \
-          interface/filesel.c interface/set_options.c     \
-          interface/plot_range.c udu.c SciPlot.c          \
-          interface/RadioWidget.c interface/cbar.c	  \
-	  utCalendar2_cal.c calcalcs.c
-
-AM_CPPFLAGS = -DNCVIEW_LIB_DIR=\"$(pkgdatadir)\" $(PPM_CPPFLAGS) $(UDUNITS2_CPPFLAGS) $(NETCDF_CPPFLAGS)
-AM_CFLAGS = $(X_CFLAGS)
-AM_LDFLAGS = $(PPM_LDFLAGS) $(UDUNITS2_LDFLAGS) $(NETCDF_LDFLAGS) $(X_PRE_LIBS) $(X_LIBS) $(X11_LIBS) $(X_EXTRA_LIBS) $(RPATH_FLAGS)
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .o .obj
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-		&& exit 0; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  src/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
-	esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure:  $(am__configure_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-install-binPROGRAMS: $(bin_PROGRAMS)
-	@$(NORMAL_INSTALL)
-	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
-	@list='$(bin_PROGRAMS)'; for p in $$list; do \
-	  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-	  if test -f $$p \
-	  ; then \
-	    f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
-	   echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
-	   $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
-	  else :; fi; \
-	done
-
-uninstall-binPROGRAMS:
-	@$(NORMAL_UNINSTALL)
-	@list='$(bin_PROGRAMS)'; for p in $$list; do \
-	  f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
-	  echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
-	  rm -f "$(DESTDIR)$(bindir)/$$f"; \
-	done
-
-clean-binPROGRAMS:
-	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
-
-clean-noinstPROGRAMS:
-	-test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
-geteuid$(EXEEXT): $(geteuid_OBJECTS) $(geteuid_DEPENDENCIES) 
-	@rm -f geteuid$(EXEEXT)
-	$(LINK) $(geteuid_OBJECTS) $(geteuid_LDADD) $(LIBS)
-ncview$(EXEEXT): $(ncview_OBJECTS) $(ncview_DEPENDENCIES) 
-	@rm -f ncview$(EXEEXT)
-	$(LINK) $(ncview_OBJECTS) $(ncview_LDADD) $(LIBS)
-
-mostlyclean-compile:
-	-rm -f *.$(OBJEXT)
-
-distclean-compile:
-	-rm -f *.tab.c
-
-include ./$(DEPDIR)/RadioWidget.Po
-include ./$(DEPDIR)/SciPlot.Po
-include ./$(DEPDIR)/calcalcs.Po
-include ./$(DEPDIR)/cbar.Po
-include ./$(DEPDIR)/dataedit.Po
-include ./$(DEPDIR)/display_info.Po
-include ./$(DEPDIR)/do_buttons.Po
-include ./$(DEPDIR)/do_print.Po
-include ./$(DEPDIR)/epic_time.Po
-include ./$(DEPDIR)/file.Po
-include ./$(DEPDIR)/file_netcdf.Po
-include ./$(DEPDIR)/filesel.Po
-include ./$(DEPDIR)/geteuid.Po
-include ./$(DEPDIR)/interface.Po
-include ./$(DEPDIR)/ncview.Po
-include ./$(DEPDIR)/overlay.Po
-include ./$(DEPDIR)/plot_range.Po
-include ./$(DEPDIR)/plot_xy.Po
-include ./$(DEPDIR)/printer_options.Po
-include ./$(DEPDIR)/range.Po
-include ./$(DEPDIR)/set_options.Po
-include ./$(DEPDIR)/udu.Po
-include ./$(DEPDIR)/utCalendar2_cal.Po
-include ./$(DEPDIR)/util.Po
-include ./$(DEPDIR)/utils.Po
-include ./$(DEPDIR)/view.Po
-include ./$(DEPDIR)/x_interface.Po
-
-.c.o:
-	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-#	source='$<' object='$@' libtool=no \
-#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-#	$(COMPILE) -c $<
-
-.c.obj:
-	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-#	source='$<' object='$@' libtool=no \
-#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-#	$(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-interface.o: interface/interface.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT interface.o -MD -MP -MF $(DEPDIR)/interface.Tpo -c -o interface.o `test -f 'interface/interface.c' || echo '$(srcdir)/'`interface/interface.c
-	mv -f $(DEPDIR)/interface.Tpo $(DEPDIR)/interface.Po
-#	source='interface/interface.c' object='interface.o' libtool=no \
-#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-#	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o interface.o `test -f 'interface/interface.c' || echo '$(srcdir)/'`interface/interface.c
-
-interface.obj: interface/interface.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT interface.obj -MD -MP -MF $(DEPDIR)/interface.Tpo -c -o interface.obj `if test -f 'interface/interface.c'; then $(CYGPATH_W) 'interface/interface.c'; else $(CYGPATH_W) '$(srcdir)/interface/interface.c'; fi`
-	mv -f $(DEPDIR)/interface.Tpo $(DEPDIR)/interface.Po
-#	source='interface/interface.c' object='interface.obj' libtool=no \
-#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-#	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o interface.obj `if test -f 'interface/interface.c'; then $(CYGPATH_W) 'interface/interface.c'; else $(CYGPATH_W) '$(srcdir)/interface/interface.c'; fi`
-
-x_interface.o: interface/x_interface.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT x_interface.o -MD -MP -MF $(DEPDIR)/x_interface.Tpo -c -o x_interface.o `test -f 'interface/x_interface.c' || echo '$(srcdir)/'`interface/x_interface.c
-	mv -f $(DEPDIR)/x_interface.Tpo $(DEPDIR)/x_interface.Po
-#	source='interface/x_interface.c' object='x_interface.o' libtool=no \
-#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-#	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o x_interface.o `test -f 'interface/x_interface.c' || echo '$(srcdir)/'`interface/x_interface.c
-
-x_interface.obj: interface/x_interface.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT x_interface.obj -MD -MP -MF $(DEPDIR)/x_interface.Tpo -c -o x_interface.obj `if test -f 'interface/x_interface.c'; then $(CYGPATH_W) 'interface/x_interface.c'; else $(CYGPATH_W) '$(srcdir)/interface/x_interface.c'; fi`
-	mv -f $(DEPDIR)/x_interface.Tpo $(DEPDIR)/x_interface.Po
-#	source='interface/x_interface.c' object='x_interface.obj' libtool=no \
-#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-#	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o x_interface.obj `if test -f 'interface/x_interface.c'; then $(CYGPATH_W) 'interface/x_interface.c'; else $(CYGPATH_W) '$(srcdir)/interface/x_interface.c'; fi`
-
-dataedit.o: interface/dataedit.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dataedit.o -MD -MP -MF $(DEPDIR)/dataedit.Tpo -c -o dataedit.o `test -f 'interface/dataedit.c' || echo '$(srcdir)/'`interface/dataedit.c
-	mv -f $(DEPDIR)/dataedit.Tpo $(DEPDIR)/dataedit.Po
-#	source='interface/dataedit.c' object='dataedit.o' libtool=no \
-#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-#	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dataedit.o `test -f 'interface/dataedit.c' || echo '$(srcdir)/'`interface/dataedit.c
-
-dataedit.obj: interface/dataedit.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dataedit.obj -MD -MP -MF $(DEPDIR)/dataedit.Tpo -c -o dataedit.obj `if test -f 'interface/dataedit.c'; then $(CYGPATH_W) 'interface/dataedit.c'; else $(CYGPATH_W) '$(srcdir)/interface/dataedit.c'; fi`
-	mv -f $(DEPDIR)/dataedit.Tpo $(DEPDIR)/dataedit.Po
-#	source='interface/dataedit.c' object='dataedit.obj' libtool=no \
-#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-#	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dataedit.obj `if test -f 'interface/dataedit.c'; then $(CYGPATH_W) 'interface/dataedit.c'; else $(CYGPATH_W) '$(srcdir)/interface/dataedit.c'; fi`
-
-display_info.o: interface/display_info.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT display_info.o -MD -MP -MF $(DEPDIR)/display_info.Tpo -c -o display_info.o `test -f 'interface/display_info.c' || echo '$(srcdir)/'`interface/display_info.c
-	mv -f $(DEPDIR)/display_info.Tpo $(DEPDIR)/display_info.Po
-#	source='interface/display_info.c' object='display_info.o' libtool=no \
-#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-#	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o display_info.o `test -f 'interface/display_info.c' || echo '$(srcdir)/'`interface/display_info.c
-
-display_info.obj: interface/display_info.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT display_info.obj -MD -MP -MF $(DEPDIR)/display_info.Tpo -c -o display_info.obj `if test -f 'interface/display_info.c'; then $(CYGPATH_W) 'interface/display_info.c'; else $(CYGPATH_W) '$(srcdir)/interface/display_info.c'; fi`
-	mv -f $(DEPDIR)/display_info.Tpo $(DEPDIR)/display_info.Po
-#	source='interface/display_info.c' object='display_info.obj' libtool=no \
-#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-#	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o display_info.obj `if test -f 'interface/display_info.c'; then $(CYGPATH_W) 'interface/display_info.c'; else $(CYGPATH_W) '$(srcdir)/interface/display_info.c'; fi`
-
-plot_xy.o: interface/plot_xy.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT plot_xy.o -MD -MP -MF $(DEPDIR)/plot_xy.Tpo -c -o plot_xy.o `test -f 'interface/plot_xy.c' || echo '$(srcdir)/'`interface/plot_xy.c
-	mv -f $(DEPDIR)/plot_xy.Tpo $(DEPDIR)/plot_xy.Po
-#	source='interface/plot_xy.c' object='plot_xy.o' libtool=no \
-#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-#	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o plot_xy.o `test -f 'interface/plot_xy.c' || echo '$(srcdir)/'`interface/plot_xy.c
-
-plot_xy.obj: interface/plot_xy.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT plot_xy.obj -MD -MP -MF $(DEPDIR)/plot_xy.Tpo -c -o plot_xy.obj `if test -f 'interface/plot_xy.c'; then $(CYGPATH_W) 'interface/plot_xy.c'; else $(CYGPATH_W) '$(srcdir)/interface/plot_xy.c'; fi`
-	mv -f $(DEPDIR)/plot_xy.Tpo $(DEPDIR)/plot_xy.Po
-#	source='interface/plot_xy.c' object='plot_xy.obj' libtool=no \
-#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-#	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o plot_xy.obj `if test -f 'interface/plot_xy.c'; then $(CYGPATH_W) 'interface/plot_xy.c'; else $(CYGPATH_W) '$(srcdir)/interface/plot_xy.c'; fi`
-
-utils.o: interface/utils.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT utils.o -MD -MP -MF $(DEPDIR)/utils.Tpo -c -o utils.o `test -f 'interface/utils.c' || echo '$(srcdir)/'`interface/utils.c
-	mv -f $(DEPDIR)/utils.Tpo $(DEPDIR)/utils.Po
-#	source='interface/utils.c' object='utils.o' libtool=no \
-#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-#	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o utils.o `test -f 'interface/utils.c' || echo '$(srcdir)/'`interface/utils.c
-
-utils.obj: interface/utils.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT utils.obj -MD -MP -MF $(DEPDIR)/utils.Tpo -c -o utils.obj `if test -f 'interface/utils.c'; then $(CYGPATH_W) 'interface/utils.c'; else $(CYGPATH_W) '$(srcdir)/interface/utils.c'; fi`
-	mv -f $(DEPDIR)/utils.Tpo $(DEPDIR)/utils.Po
-#	source='interface/utils.c' object='utils.obj' libtool=no \
-#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-#	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o utils.obj `if test -f 'interface/utils.c'; then $(CYGPATH_W) 'interface/utils.c'; else $(CYGPATH_W) '$(srcdir)/interface/utils.c'; fi`
-
-range.o: interface/range.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT range.o -MD -MP -MF $(DEPDIR)/range.Tpo -c -o range.o `test -f 'interface/range.c' || echo '$(srcdir)/'`interface/range.c
-	mv -f $(DEPDIR)/range.Tpo $(DEPDIR)/range.Po
-#	source='interface/range.c' object='range.o' libtool=no \
-#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-#	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o range.o `test -f 'interface/range.c' || echo '$(srcdir)/'`interface/range.c
-
-range.obj: interface/range.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT range.obj -MD -MP -MF $(DEPDIR)/range.Tpo -c -o range.obj `if test -f 'interface/range.c'; then $(CYGPATH_W) 'interface/range.c'; else $(CYGPATH_W) '$(srcdir)/interface/range.c'; fi`
-	mv -f $(DEPDIR)/range.Tpo $(DEPDIR)/range.Po
-#	source='interface/range.c' object='range.obj' libtool=no \
-#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-#	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o range.obj `if test -f 'interface/range.c'; then $(CYGPATH_W) 'interface/range.c'; else $(CYGPATH_W) '$(srcdir)/interface/range.c'; fi`
-
-printer_options.o: interface/printer_options.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT printer_options.o -MD -MP -MF $(DEPDIR)/printer_options.Tpo -c -o printer_options.o `test -f 'interface/printer_options.c' || echo '$(srcdir)/'`interface/printer_options.c
-	mv -f $(DEPDIR)/printer_options.Tpo $(DEPDIR)/printer_options.Po
-#	source='interface/printer_options.c' object='printer_options.o' libtool=no \
-#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-#	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o printer_options.o `test -f 'interface/printer_options.c' || echo '$(srcdir)/'`interface/printer_options.c
-
-printer_options.obj: interface/printer_options.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT printer_options.obj -MD -MP -MF $(DEPDIR)/printer_options.Tpo -c -o printer_options.obj `if test -f 'interface/printer_options.c'; then $(CYGPATH_W) 'interface/printer_options.c'; else $(CYGPATH_W) '$(srcdir)/interface/printer_options.c'; fi`
-	mv -f $(DEPDIR)/printer_options.Tpo $(DEPDIR)/printer_options.Po
-#	source='interface/printer_options.c' object='printer_options.obj' libtool=no \
-#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-#	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o printer_options.obj `if test -f 'interface/printer_options.c'; then $(CYGPATH_W) 'interface/printer_options.c'; else $(CYGPATH_W) '$(srcdir)/interface/printer_options.c'; fi`
-
-filesel.o: interface/filesel.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT filesel.o -MD -MP -MF $(DEPDIR)/filesel.Tpo -c -o filesel.o `test -f 'interface/filesel.c' || echo '$(srcdir)/'`interface/filesel.c
-	mv -f $(DEPDIR)/filesel.Tpo $(DEPDIR)/filesel.Po
-#	source='interface/filesel.c' object='filesel.o' libtool=no \
-#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-#	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o filesel.o `test -f 'interface/filesel.c' || echo '$(srcdir)/'`interface/filesel.c
-
-filesel.obj: interface/filesel.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT filesel.obj -MD -MP -MF $(DEPDIR)/filesel.Tpo -c -o filesel.obj `if test -f 'interface/filesel.c'; then $(CYGPATH_W) 'interface/filesel.c'; else $(CYGPATH_W) '$(srcdir)/interface/filesel.c'; fi`
-	mv -f $(DEPDIR)/filesel.Tpo $(DEPDIR)/filesel.Po
-#	source='interface/filesel.c' object='filesel.obj' libtool=no \
-#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-#	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o filesel.obj `if test -f 'interface/filesel.c'; then $(CYGPATH_W) 'interface/filesel.c'; else $(CYGPATH_W) '$(srcdir)/interface/filesel.c'; fi`
-
-set_options.o: interface/set_options.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT set_options.o -MD -MP -MF $(DEPDIR)/set_options.Tpo -c -o set_options.o `test -f 'interface/set_options.c' || echo '$(srcdir)/'`interface/set_options.c
-	mv -f $(DEPDIR)/set_options.Tpo $(DEPDIR)/set_options.Po
-#	source='interface/set_options.c' object='set_options.o' libtool=no \
-#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-#	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o set_options.o `test -f 'interface/set_options.c' || echo '$(srcdir)/'`interface/set_options.c
-
-set_options.obj: interface/set_options.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT set_options.obj -MD -MP -MF $(DEPDIR)/set_options.Tpo -c -o set_options.obj `if test -f 'interface/set_options.c'; then $(CYGPATH_W) 'interface/set_options.c'; else $(CYGPATH_W) '$(srcdir)/interface/set_options.c'; fi`
-	mv -f $(DEPDIR)/set_options.Tpo $(DEPDIR)/set_options.Po
-#	source='interface/set_options.c' object='set_options.obj' libtool=no \
-#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-#	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o set_options.obj `if test -f 'interface/set_options.c'; then $(CYGPATH_W) 'interface/set_options.c'; else $(CYGPATH_W) '$(srcdir)/interface/set_options.c'; fi`
-
-plot_range.o: interface/plot_range.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT plot_range.o -MD -MP -MF $(DEPDIR)/plot_range.Tpo -c -o plot_range.o `test -f 'interface/plot_range.c' || echo '$(srcdir)/'`interface/plot_range.c
-	mv -f $(DEPDIR)/plot_range.Tpo $(DEPDIR)/plot_range.Po
-#	source='interface/plot_range.c' object='plot_range.o' libtool=no \
-#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-#	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o plot_range.o `test -f 'interface/plot_range.c' || echo '$(srcdir)/'`interface/plot_range.c
-
-plot_range.obj: interface/plot_range.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT plot_range.obj -MD -MP -MF $(DEPDIR)/plot_range.Tpo -c -o plot_range.obj `if test -f 'interface/plot_range.c'; then $(CYGPATH_W) 'interface/plot_range.c'; else $(CYGPATH_W) '$(srcdir)/interface/plot_range.c'; fi`
-	mv -f $(DEPDIR)/plot_range.Tpo $(DEPDIR)/plot_range.Po
-#	source='interface/plot_range.c' object='plot_range.obj' libtool=no \
-#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-#	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o plot_range.obj `if test -f 'interface/plot_range.c'; then $(CYGPATH_W) 'interface/plot_range.c'; else $(CYGPATH_W) '$(srcdir)/interface/plot_range.c'; fi`
-
-RadioWidget.o: interface/RadioWidget.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT RadioWidget.o -MD -MP -MF $(DEPDIR)/RadioWidget.Tpo -c -o RadioWidget.o `test -f 'interface/RadioWidget.c' || echo '$(srcdir)/'`interface/RadioWidget.c
-	mv -f $(DEPDIR)/RadioWidget.Tpo $(DEPDIR)/RadioWidget.Po
-#	source='interface/RadioWidget.c' object='RadioWidget.o' libtool=no \
-#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-#	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o RadioWidget.o `test -f 'interface/RadioWidget.c' || echo '$(srcdir)/'`interface/RadioWidget.c
-
-RadioWidget.obj: interface/RadioWidget.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT RadioWidget.obj -MD -MP -MF $(DEPDIR)/RadioWidget.Tpo -c -o RadioWidget.obj `if test -f 'interface/RadioWidget.c'; then $(CYGPATH_W) 'interface/RadioWidget.c'; else $(CYGPATH_W) '$(srcdir)/interface/RadioWidget.c'; fi`
-	mv -f $(DEPDIR)/RadioWidget.Tpo $(DEPDIR)/RadioWidget.Po
-#	source='interface/RadioWidget.c' object='RadioWidget.obj' libtool=no \
-#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-#	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o RadioWidget.obj `if test -f 'interface/RadioWidget.c'; then $(CYGPATH_W) 'interface/RadioWidget.c'; else $(CYGPATH_W) '$(srcdir)/interface/RadioWidget.c'; fi`
-
-cbar.o: interface/cbar.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cbar.o -MD -MP -MF $(DEPDIR)/cbar.Tpo -c -o cbar.o `test -f 'interface/cbar.c' || echo '$(srcdir)/'`interface/cbar.c
-	mv -f $(DEPDIR)/cbar.Tpo $(DEPDIR)/cbar.Po
-#	source='interface/cbar.c' object='cbar.o' libtool=no \
-#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-#	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cbar.o `test -f 'interface/cbar.c' || echo '$(srcdir)/'`interface/cbar.c
-
-cbar.obj: interface/cbar.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cbar.obj -MD -MP -MF $(DEPDIR)/cbar.Tpo -c -o cbar.obj `if test -f 'interface/cbar.c'; then $(CYGPATH_W) 'interface/cbar.c'; else $(CYGPATH_W) '$(srcdir)/interface/cbar.c'; fi`
-	mv -f $(DEPDIR)/cbar.Tpo $(DEPDIR)/cbar.Po
-#	source='interface/cbar.c' object='cbar.obj' libtool=no \
-#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-#	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cbar.obj `if test -f 'interface/cbar.c'; then $(CYGPATH_W) 'interface/cbar.c'; else $(CYGPATH_W) '$(srcdir)/interface/cbar.c'; fi`
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	mkid -fID $$unique
-tags: TAGS
-
-TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
-	  test -n "$$unique" || unique=$$empty_fix; \
-	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	    $$tags $$unique; \
-	fi
-ctags: CTAGS
-CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	tags=; \
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
-	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
-
-GTAGS:
-	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
-	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='$(DISTFILES)'; \
-	  dist_files=`for file in $$list; do echo $$file; done | \
-	  sed -e "s|^$$srcdirstrip/||;t" \
-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-	case $$dist_files in \
-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-			   sort -u` ;; \
-	esac; \
-	for file in $$dist_files; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
-	    fi; \
-	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
-	  else \
-	    test -f $(distdir)/$$file \
-	    || cp -p $$d/$$file $(distdir)/$$file \
-	    || exit 1; \
-	  fi; \
-	done
-check-am: all-am
-check: check-am
-all-am: Makefile $(PROGRAMS)
-installdirs:
-	for dir in "$(DESTDIR)$(bindir)"; do \
-	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
-	done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-binPROGRAMS clean-generic clean-noinstPROGRAMS \
-	mostlyclean-am
-
-distclean: distclean-am
-	-rm -rf ./$(DEPDIR)
-	-rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-am
-
-install-exec-am: install-binPROGRAMS
-
-install-html: install-html-am
-
-install-info: install-info-am
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-ps: install-ps-am
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-	-rm -rf ./$(DEPDIR)
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-binPROGRAMS
-
-.MAKE: install-am install-strip
-
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
-	clean-generic clean-noinstPROGRAMS ctags distclean \
-	distclean-compile distclean-generic distclean-tags distdir dvi \
-	dvi-am html html-am info info-am install install-am \
-	install-binPROGRAMS install-data install-data-am install-dvi \
-	install-dvi-am install-exec install-exec-am install-html \
-	install-html-am install-info install-info-am install-man \
-	install-pdf install-pdf-am install-ps install-ps-am \
-	install-strip installcheck installcheck-am installdirs \
-	maintainer-clean maintainer-clean-generic mostlyclean \
-	mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
-	tags uninstall uninstall-am uninstall-binPROGRAMS
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/src/Makefile.am b/src/Makefile.am
index beb0ce3..f27ba2f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -2,7 +2,7 @@ bin_PROGRAMS=ncview
 noinst_PROGRAMS=geteuid
 geteuid_SOURCES=geteuid.c
 ncview_SOURCES=$(headers) $(sources)
-ncview_LDADD=$(PPM_LIBS) $(UDUNITS2_LDFLAGS) -lm $(NETCDF_LDFLAGS) $(XAW_LIBS) $(X_PRE_LIBS) $(X_LIBS) $(X11_LIBS) $(X_EXTRA_LIBS)
+ncview_LDADD=$(PNG_LIBS) $(UDUNITS2_LDFLAGS) -lm $(NETCDF_LDFLAGS) $(XAW_LIBS) $(X_PRE_LIBS) $(X_LIBS) $(X11_LIBS) $(X_EXTRA_LIBS) -lpng
 
 headers = ncview.bitmaps.h ncview.includes.h             \
           ncview.defines.h ncview.protos.h               \
@@ -17,7 +17,7 @@ headers = ncview.bitmaps.h ncview.includes.h             \
           interface/open_circle_bitmap.h \
           interface/fallback_resources.h interface/RadioWidget.h \
           interface/helvR08.h interface/widgets.h 	\
-	  calcalcs.h
+	  calcalcs.h Stringlist.h
 sources = ncview.c file.c util.c do_buttons.c             \
           file_netcdf.c   view.c do_print.c               \
           epic_time.c interface/interface.c               \
@@ -28,8 +28,10 @@ sources = ncview.c file.c util.c do_buttons.c             \
           interface/filesel.c interface/set_options.c     \
           interface/plot_range.c udu.c SciPlot.c          \
           interface/RadioWidget.c interface/cbar.c	  \
-	  utCalendar2_cal.c calcalcs.c
+	  utCalendar2_cal.c calcalcs.c 			  \
+	  interface/colormap_funcs.c interface/make_tc_data.c \
+	  stringlist.c handle_rc_file.c
 
-AM_CPPFLAGS=-DNCVIEW_LIB_DIR=\"$(pkgdatadir)\" $(PPM_CPPFLAGS) $(UDUNITS2_CPPFLAGS) $(NETCDF_CPPFLAGS)
-AM_CFLAGS=$(X_CFLAGS)
-AM_LDFLAGS=$(PPM_LDFLAGS) $(UDUNITS2_LDFLAGS) $(NETCDF_LDFLAGS) $(X_PRE_LIBS) $(X_LIBS) $(X11_LIBS) $(X_EXTRA_LIBS) $(RPATH_FLAGS)
+AM_CPPFLAGS=-DNCVIEW_LIB_DIR=\"$(pkgdatadir)\" $(PNG_CPPFLAGS) $(UDUNITS2_CPPFLAGS) $(NETCDF_CPPFLAGS)
+AM_CFLAGS=-Wall $(X_CFLAGS)
+AM_LDFLAGS=$(PNG_LDFLAGS) $(UDUNITS2_LDFLAGS) $(NETCDF_LDFLAGS) $(X_PRE_LIBS) $(X_LIBS) $(X11_LIBS) $(X_EXTRA_LIBS) $(RPATH_FLAGS)
diff --git a/src/Makefile.in b/src/Makefile.in
index ecbe030..bc95987 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -36,7 +36,7 @@ subdir = src
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4macros/netcdf.m4 \
-	$(top_srcdir)/m4macros/ppm.m4 \
+	$(top_srcdir)/m4macros/png.m4 \
 	$(top_srcdir)/m4macros/udunits2.m4 $(top_srcdir)/configure.in
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
@@ -58,14 +58,16 @@ am__objects_2 = ncview.$(OBJEXT) file.$(OBJEXT) util.$(OBJEXT) \
 	range.$(OBJEXT) printer_options.$(OBJEXT) overlay.$(OBJEXT) \
 	filesel.$(OBJEXT) set_options.$(OBJEXT) plot_range.$(OBJEXT) \
 	udu.$(OBJEXT) SciPlot.$(OBJEXT) RadioWidget.$(OBJEXT) \
-	cbar.$(OBJEXT) utCalendar2_cal.$(OBJEXT) calcalcs.$(OBJEXT)
+	cbar.$(OBJEXT) utCalendar2_cal.$(OBJEXT) calcalcs.$(OBJEXT) \
+	colormap_funcs.$(OBJEXT) make_tc_data.$(OBJEXT) \
+	stringlist.$(OBJEXT) handle_rc_file.$(OBJEXT)
 am_ncview_OBJECTS = $(am__objects_1) $(am__objects_2)
 ncview_OBJECTS = $(am_ncview_OBJECTS)
 am__DEPENDENCIES_1 =
 ncview_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1)
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
 DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
@@ -92,10 +94,10 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
-DO_PPM_INCDIR = @DO_PPM_INCDIR@
-DO_PPM_LIBDIR = @DO_PPM_LIBDIR@
-DO_PPM_LIBNAME = @DO_PPM_LIBNAME@
-DO_PPM_LINE = @DO_PPM_LINE@
+DO_PNG_INCDIR = @DO_PNG_INCDIR@
+DO_PNG_LIBDIR = @DO_PNG_LIBDIR@
+DO_PNG_LIBNAME = @DO_PNG_LIBNAME@
+DO_PNG_LINE = @DO_PNG_LINE@
 DO_UDUNITS2_INCDIR = @DO_UDUNITS2_INCDIR@
 DO_UDUNITS2_LIBDIR = @DO_UDUNITS2_LIBDIR@
 DO_UDUNITS2_LIBNAME = @DO_UDUNITS2_LIBNAME@
@@ -131,9 +133,9 @@ PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
-PPM_INCDIR = @PPM_INCDIR@
-PPM_LIBDIR = @PPM_LIBDIR@
-PPM_LIBNAME = @PPM_LIBNAME@
+PNG_CPPFLAGS = @PNG_CPPFLAGS@
+PNG_LDFLAGS = @PNG_LDFLAGS@
+PNG_LIBS = @PNG_LIBS@
 PREFIX = @PREFIX@
 RPATH_FLAGS = @RPATH_FLAGS@
 SET_MAKE = @SET_MAKE@
@@ -194,7 +196,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 geteuid_SOURCES = geteuid.c
 ncview_SOURCES = $(headers) $(sources)
-ncview_LDADD = $(PPM_LIBS) $(UDUNITS2_LDFLAGS) -lm $(NETCDF_LDFLAGS) $(XAW_LIBS) $(X_PRE_LIBS) $(X_LIBS) $(X11_LIBS) $(X_EXTRA_LIBS)
+ncview_LDADD = $(PNG_LIBS) $(UDUNITS2_LDFLAGS) -lm $(NETCDF_LDFLAGS) $(XAW_LIBS) $(X_PRE_LIBS) $(X_LIBS) $(X11_LIBS) $(X_EXTRA_LIBS) -lpng
 headers = ncview.bitmaps.h ncview.includes.h             \
           ncview.defines.h ncview.protos.h               \
           utCalendar2_cal.h SciPlot.h SciPlotP.h 	 \
@@ -208,7 +210,7 @@ headers = ncview.bitmaps.h ncview.includes.h             \
           interface/open_circle_bitmap.h \
           interface/fallback_resources.h interface/RadioWidget.h \
           interface/helvR08.h interface/widgets.h 	\
-	  calcalcs.h
+	  calcalcs.h Stringlist.h
 
 sources = ncview.c file.c util.c do_buttons.c             \
           file_netcdf.c   view.c do_print.c               \
@@ -220,11 +222,13 @@ sources = ncview.c file.c util.c do_buttons.c             \
           interface/filesel.c interface/set_options.c     \
           interface/plot_range.c udu.c SciPlot.c          \
           interface/RadioWidget.c interface/cbar.c	  \
-	  utCalendar2_cal.c calcalcs.c
+	  utCalendar2_cal.c calcalcs.c 			  \
+	  interface/colormap_funcs.c interface/make_tc_data.c \
+	  stringlist.c handle_rc_file.c
 
-AM_CPPFLAGS = -DNCVIEW_LIB_DIR=\"$(pkgdatadir)\" $(PPM_CPPFLAGS) $(UDUNITS2_CPPFLAGS) $(NETCDF_CPPFLAGS)
-AM_CFLAGS = $(X_CFLAGS)
-AM_LDFLAGS = $(PPM_LDFLAGS) $(UDUNITS2_LDFLAGS) $(NETCDF_LDFLAGS) $(X_PRE_LIBS) $(X_LIBS) $(X11_LIBS) $(X_EXTRA_LIBS) $(RPATH_FLAGS)
+AM_CPPFLAGS = -DNCVIEW_LIB_DIR=\"$(pkgdatadir)\" $(PNG_CPPFLAGS) $(UDUNITS2_CPPFLAGS) $(NETCDF_CPPFLAGS)
+AM_CFLAGS = -Wall $(X_CFLAGS)
+AM_LDFLAGS = $(PNG_LDFLAGS) $(UDUNITS2_LDFLAGS) $(NETCDF_LDFLAGS) $(X_PRE_LIBS) $(X_LIBS) $(X11_LIBS) $(X_EXTRA_LIBS) $(RPATH_FLAGS)
 all: all-am
 
 .SUFFIXES:
@@ -301,6 +305,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/SciPlot.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/calcalcs.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cbar.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/colormap_funcs.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dataedit.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/display_info.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/do_buttons.Po at am__quote@
@@ -310,7 +315,9 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/file_netcdf.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/filesel.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/geteuid.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/handle_rc_file.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/interface.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/make_tc_data.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ncview.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/overlay.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/plot_range.Po at am__quote@
@@ -318,6 +325,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/printer_options.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/range.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/set_options.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/stringlist.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/udu.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/utCalendar2_cal.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/util.Po at am__quote@
@@ -521,6 +529,34 @@ cbar.obj: interface/cbar.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cbar.obj `if test -f 'interface/cbar.c'; then $(CYGPATH_W) 'interface/cbar.c'; else $(CYGPATH_W) '$(srcdir)/interface/cbar.c'; fi`
 
+colormap_funcs.o: interface/colormap_funcs.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT colormap_funcs.o -MD -MP -MF $(DEPDIR)/colormap_funcs.Tpo -c -o colormap_funcs.o `test -f 'interface/colormap_funcs.c' || echo '$(srcdir)/'`interface/colormap_funcs.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/colormap_funcs.Tpo $(DEPDIR)/colormap_funcs.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='interface/colormap_funcs.c' object='colormap_funcs.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o colormap_funcs.o `test -f 'interface/colormap_funcs.c' || echo '$(srcdir)/'`interface/colormap_funcs.c
+
+colormap_funcs.obj: interface/colormap_funcs.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT colormap_funcs.obj -MD -MP -MF $(DEPDIR)/colormap_funcs.Tpo -c -o colormap_funcs.obj `if test -f 'interface/colormap_funcs.c'; then $(CYGPATH_W) 'interface/colormap_funcs.c'; else $(CYGPATH_W) '$(srcdir)/interface/colormap_funcs.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/colormap_funcs.Tpo $(DEPDIR)/colormap_funcs.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='interface/colormap_funcs.c' object='colormap_funcs.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o colormap_funcs.obj `if test -f 'interface/colormap_funcs.c'; then $(CYGPATH_W) 'interface/colormap_funcs.c'; else $(CYGPATH_W) '$(srcdir)/interface/colormap_funcs.c'; fi`
+
+make_tc_data.o: interface/make_tc_data.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT make_tc_data.o -MD -MP -MF $(DEPDIR)/make_tc_data.Tpo -c -o make_tc_data.o `test -f 'interface/make_tc_data.c' || echo '$(srcdir)/'`interface/make_tc_data.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/make_tc_data.Tpo $(DEPDIR)/make_tc_data.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='interface/make_tc_data.c' object='make_tc_data.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o make_tc_data.o `test -f 'interface/make_tc_data.c' || echo '$(srcdir)/'`interface/make_tc_data.c
+
+make_tc_data.obj: interface/make_tc_data.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT make_tc_data.obj -MD -MP -MF $(DEPDIR)/make_tc_data.Tpo -c -o make_tc_data.obj `if test -f 'interface/make_tc_data.c'; then $(CYGPATH_W) 'interface/make_tc_data.c'; else $(CYGPATH_W) '$(srcdir)/interface/make_tc_data.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/make_tc_data.Tpo $(DEPDIR)/make_tc_data.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='interface/make_tc_data.c' object='make_tc_data.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o make_tc_data.obj `if test -f 'interface/make_tc_data.c'; then $(CYGPATH_W) 'interface/make_tc_data.c'; else $(CYGPATH_W) '$(srcdir)/interface/make_tc_data.c'; fi`
+
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
diff --git a/src/RadioWidget.o b/src/RadioWidget.o
deleted file mode 100644
index d0307b9..0000000
Binary files a/src/RadioWidget.o and /dev/null differ
diff --git a/src/SciPlot.o b/src/SciPlot.o
deleted file mode 100644
index 2be6067..0000000
Binary files a/src/SciPlot.o and /dev/null differ
diff --git a/src/calcalcs.o b/src/calcalcs.o
deleted file mode 100644
index a6f1e64..0000000
Binary files a/src/calcalcs.o and /dev/null differ
diff --git a/src/cbar.o b/src/cbar.o
deleted file mode 100644
index c0e27fb..0000000
Binary files a/src/cbar.o and /dev/null differ
diff --git a/src/colormaps_banded.h b/src/colormaps_banded.h
new file mode 100644
index 0000000..a8d5958
--- /dev/null
+++ b/src/colormaps_banded.h
@@ -0,0 +1,44 @@
+static int cmap_banded[] = { 103,  2,126, 107,  5,133, 110, 10,139,
+ 113, 16,143, 114, 20,147, 113, 23,148, 110, 23,149, 107, 20,149, 103, 16,149,
+  99, 10,152,  97,  6,157,  95,  2,164,  95,  0,172,  95,  0,181,  95,  0,189,
+  95,  4,196,  96,  9,201,  96, 17,204,  96, 24,206,  95, 30,206,  90, 32,203,
+  84, 30,200,  75, 26,197,  64, 19,195,  54, 12,196,  45,  6,199,  37,  2,206,
+  31,  0,214,  25,  0,222,  21,  1,229,  19,  6,234,  20, 13,237,  22, 21,239,
+  30, 35,238,  35, 46,235,  36, 52,230,  34, 54,224,  27, 53,219,  20, 51,216,
+  12, 50,216,   5, 51,220,   1, 55,226,   0, 61,233,   0, 69,241,   2, 79,247,
+   7, 89,250,  15,101,252,  25,112,252,  33,121,250,  37,126,245,  38,128,239,
+  34,127,232,  27,125,226,  19,123,223,  11,123,223,   5,127,226,   1,133,232,
+   0,141,239,   0,149,246,   3,158,251,   9,166,254,  17,173,254,  27,179,254,
+  34,183,251,  38,184,245,  37,182,238,  33,178,231,  25,175,226,  17,174,223,
+   9,175,223,   4,180,227,   0,188,234,   0,197,241,   0,205,248,   4,213,252,
+  11,219,254,  19,224,254,  28,227,253,  35,227,250,  38,225,244,  37,221,237,
+  31,217,230,  24,215,225,  15,215,223,   8,219,224,   3,227,229,   0,235,234,
+   0,242,237,   1,249,240,   5,253,240,  12,254,238,  21,254,235,  30,253,230,
+  36,249,224,  38,243,215,  36,235,205,  30,229,194,  22,224,185,  14,223,178,
+   7,225,174,   2,230,172,   0,237,172,   0,244,171,   1,250,171,   6,253,169,
+  14,254,167,  23,254,164,  32,252,161,  37,248,155,  38,241,147,  35,234,136,
+  28,228,125,  20,224,113,  12,223,103,   6,226, 94,   1,231, 87,   0,238, 82,
+   0,245, 77,   2,251, 73,   8,254, 71,  16,254, 70,  25,254, 70,  33,251, 70,
+  38,246, 66,  38,240, 60,  34,232, 49,  27,226, 36,  19,223, 22,  14,223, 11,
+  15,226,  4,  18,232,  1,  25,240,  0,  34,246,  0,  45,251,  3,  58,254,  9,
+  72,254, 18,  85,254, 27,  96,251, 34, 104,245, 38, 107,238, 37, 107,231, 33,
+ 106,226, 25, 105,223, 17, 107,224,  9, 112,228,  3, 119,234,  0, 129,241,  0,
+ 139,248,  0, 150,252,  4, 160,254, 11, 169,254, 19, 176,253, 28, 181,250, 35,
+ 183,244, 38, 182,237, 37, 180,230, 31, 178,225, 24, 179,223, 15, 182,224,  8,
+ 190,229,  3, 199,235,  0, 209,243,  0, 219,249,  1, 228,253,  5, 234,254, 12,
+ 239,254, 21, 241,253, 30, 241,249, 36, 238,242, 38, 234,235, 36, 229,227, 30,
+ 224,219, 22, 223,215, 14, 225,214,  7, 230,215,  2, 237,218,  0, 244,222,  0,
+ 250,224,  1, 253,224,  6, 254,223, 14, 254,221, 23, 252,217, 32, 248,212, 37,
+ 241,204, 38, 234,195, 35, 227,186, 28, 223,178, 20, 223,173, 12, 226,170,  5,
+ 231,170,  1, 238,171,  0, 245,172,  0, 251,173,  2, 254,173,  8, 254,172, 16,
+ 254,172, 25, 251,169, 33, 246,164, 38, 239,156, 38, 232,147, 34, 226,137, 27,
+ 223,127, 18, 223,119, 11, 226,113,  4, 232,110,  1, 239,107,  0, 245,105,  0,
+ 250,103,  3, 252,102,  9, 252,102, 18, 250,102, 27, 247,101, 34, 241, 96, 37,
+ 233, 89, 37, 226, 78, 32, 220, 66, 24, 216, 54, 16, 216, 42,  9, 219, 32,  3,
+ 224, 24,  0, 230, 18,  0, 235, 13,  0, 238, 10,  4, 239, 10, 11, 237, 18, 25,
+ 234, 26, 39, 229, 32, 50, 222, 35, 56, 214, 33, 59, 206, 28, 59, 199, 21, 57,
+ 196, 13, 55, 195,  7, 55, 197,  2, 58, 200,  0, 63, 203,  0, 69, 206,  1, 76,
+ 206,  4, 84, 204, 10, 92, 201, 17,100, 196, 23,106, 189, 28,109, 181, 29,109,
+ 172, 26,107, 164, 21,104, 157, 15,100, 152,  9, 99, 149,  4, 99, 149,  1,100,
+ 149,  0,103, 148,  0,106, 147,  1,109, 143,  3,110, 139,  8,110, 133, 12,109,
+                                                                126, 16,106 };
diff --git a/src/colormaps_blu_red.h b/src/colormaps_blu_red.h
new file mode 100644
index 0000000..e521d4c
--- /dev/null
+++ b/src/colormaps_blu_red.h
@@ -0,0 +1,44 @@
+static int cmap_blu_red[] = {  42,  0,127,  42,  0,130,  42,  0,133,
+  42,  0,136,  42,  0,139,  41,  0,142,  41,  0,145,  41,  0,148,  40,  0,151,
+  40,  0,154,  40,  0,157,  39,  0,160,  39,  0,163,  38,  0,166,  37,  0,169,
+  37,  0,172,  36,  0,175,  35,  0,178,  34,  0,181,  34,  0,184,  33,  0,187,
+  32,  0,190,  31,  0,193,  30,  0,196,  28,  0,199,  27,  0,202,  26,  0,205,
+  25,  0,208,  24,  0,211,  22,  0,214,  21,  0,217,  19,  0,220,  18,  0,223,
+  16,  0,226,  15,  0,229,  13,  0,232,  12,  0,235,  10,  0,238,   8,  0,241,
+   6,  0,244,   4,  0,247,   2,  0,250,   0,  0,253,   1,  2,255,   4,  7,255,
+   7, 12,255,  10, 17,255,  13, 22,255,  16, 26,255,  19, 31,255,  22, 36,255,
+  25, 40,255,  28, 45,255,  31, 49,255,  34, 54,255,  37, 58,255,  40, 63,255,
+  43, 67,255,  46, 71,255,  49, 76,255,  52, 80,255,  55, 84,255,  58, 88,255,
+  61, 92,255,  64, 96,255,  67,100,255,  70,104,255,  73,108,255,  76,112,255,
+  79,115,255,  82,119,255,  85,123,255,  88,127,255,  91,130,255,  94,134,255,
+  97,137,255, 100,141,255, 103,144,255, 106,147,255, 109,151,255, 112,154,255,
+ 115,157,255, 118,160,255, 121,163,255, 124,166,255, 127,170,255, 130,172,255,
+ 133,175,255, 136,178,255, 139,181,255, 142,184,255, 145,187,255, 148,189,255,
+ 151,192,255, 154,195,255, 157,197,255, 160,200,255, 163,202,255, 166,205,255,
+ 169,207,255, 172,209,255, 175,211,255, 178,214,255, 181,216,255, 184,218,255,
+ 187,220,255, 190,222,255, 193,224,255, 196,226,255, 199,228,255, 202,230,255,
+ 205,232,255, 208,233,255, 211,235,255, 214,237,255, 217,238,255, 220,240,255,
+ 223,241,255, 226,243,255, 229,244,255, 232,246,255, 235,247,255, 238,248,255,
+ 241,250,255, 244,251,255, 247,252,255, 250,253,255, 253,254,255, 255,254,253,
+ 255,253,250, 255,252,247, 255,251,244, 255,250,241, 255,248,238, 255,247,235,
+ 255,246,232, 255,244,229, 255,243,226, 255,241,223, 255,240,220, 255,238,217,
+ 255,237,214, 255,235,211, 255,233,208, 255,232,205, 255,230,202, 255,228,199,
+ 255,226,196, 255,224,193, 255,222,190, 255,220,187, 255,218,184, 255,216,181,
+ 255,214,178, 255,211,175, 255,209,172, 255,207,169, 255,205,166, 255,202,163,
+ 255,200,160, 255,197,157, 255,195,154, 255,192,151, 255,189,148, 255,187,145,
+ 255,184,142, 255,181,139, 255,178,136, 255,175,133, 255,172,130, 255,169,127,
+ 255,166,124, 255,163,121, 255,160,118, 255,157,115, 255,154,112, 255,151,109,
+ 255,147,106, 255,144,103, 255,141,100, 255,137, 97, 255,134, 94, 255,130, 91,
+ 255,127, 88, 255,123, 85, 255,119, 82, 255,115, 79, 255,112, 76, 255,108, 73,
+ 255,104, 70, 255,100, 67, 255, 96, 64, 255, 92, 61, 255, 88, 58, 255, 84, 55,
+ 255, 80, 52, 255, 76, 49, 255, 71, 46, 255, 67, 43, 255, 63, 40, 255, 58, 37,
+ 255, 54, 34, 255, 49, 31, 255, 45, 28, 255, 40, 25, 255, 36, 22, 255, 31, 19,
+ 255, 26, 16, 255, 22, 13, 255, 17, 10, 255, 12,  7, 255,  7,  4, 255,  2,  1,
+ 253,  0,  0, 250,  0,  2, 247,  0,  4, 244,  0,  6, 241,  0,  8, 238,  0, 10,
+ 235,  0, 12, 232,  0, 13, 229,  0, 15, 226,  0, 16, 223,  0, 18, 220,  0, 19,
+ 217,  0, 21, 214,  0, 22, 211,  0, 24, 208,  0, 25, 205,  0, 26, 202,  0, 27,
+ 199,  0, 28, 196,  0, 30, 193,  0, 31, 190,  0, 32, 187,  0, 33, 184,  0, 34,
+ 181,  0, 34, 178,  0, 35, 175,  0, 36, 172,  0, 37, 169,  0, 37, 166,  0, 38,
+ 163,  0, 39, 160,  0, 39, 157,  0, 40, 154,  0, 40, 151,  0, 40, 148,  0, 41,
+ 145,  0, 41, 142,  0, 41, 139,  0, 42, 136,  0, 42, 133,  0, 42, 130,  0, 42,
+                                                                127,  0, 42 };
diff --git a/src/colormaps_blue_red.h b/src/colormaps_blue_red.h
new file mode 100644
index 0000000..493be71
--- /dev/null
+++ b/src/colormaps_blue_red.h
@@ -0,0 +1,44 @@
+static int cmap_blue_red[] = {   0,  0,127,   0,  0,130,   0,  0,133,
+   0,  0,136,   0,  0,139,   0,  0,142,   0,  0,145,   0,  0,148,   0,  0,151,
+   0,  0,154,   0,  0,157,   0,  0,160,   0,  0,163,   0,  0,166,   0,  0,169,
+   0,  0,172,   0,  0,175,   0,  0,178,   0,  0,181,   0,  0,184,   0,  0,187,
+   0,  0,190,   0,  0,193,   0,  0,196,   0,  0,199,   0,  0,202,   0,  0,205,
+   0,  0,208,   0,  0,211,   0,  0,214,   0,  0,217,   0,  0,220,   0,  0,223,
+   0,  0,226,   0,  0,229,   0,  0,232,   0,  0,235,   0,  0,238,   0,  0,241,
+   0,  0,244,   0,  0,247,   0,  0,250,   0,  0,253,   1,  1,255,   4,  4,255,
+   7,  7,255,  10, 10,255,  13, 13,255,  16, 16,255,  19, 19,255,  22, 22,255,
+  25, 25,255,  28, 28,255,  31, 31,255,  34, 34,255,  37, 37,255,  40, 40,255,
+  43, 43,255,  46, 46,255,  49, 49,255,  52, 52,255,  55, 55,255,  58, 58,255,
+  61, 61,255,  64, 64,255,  67, 67,255,  70, 70,255,  73, 73,255,  76, 76,255,
+  79, 79,255,  82, 82,255,  85, 85,255,  88, 88,255,  91, 91,255,  94, 94,255,
+  97, 97,255, 100,100,255, 103,103,255, 106,106,255, 109,109,255, 112,112,255,
+ 115,115,255, 118,118,255, 121,121,255, 124,124,255, 127,127,255, 130,130,255,
+ 133,133,255, 136,136,255, 139,139,255, 142,142,255, 145,145,255, 148,148,255,
+ 151,151,255, 154,154,255, 157,157,255, 160,160,255, 163,163,255, 166,166,255,
+ 169,169,255, 172,172,255, 175,175,255, 178,178,255, 181,181,255, 184,184,255,
+ 187,187,255, 190,190,255, 193,193,255, 196,196,255, 199,199,255, 202,202,255,
+ 205,205,255, 208,208,255, 211,211,255, 214,214,255, 217,217,255, 220,220,255,
+ 223,223,255, 226,226,255, 229,229,255, 232,232,255, 235,235,255, 238,238,255,
+ 241,241,255, 244,244,255, 247,247,255, 250,250,255, 253,253,255, 255,253,253,
+ 255,250,250, 255,247,247, 255,244,244, 255,241,241, 255,238,238, 255,235,235,
+ 255,232,232, 255,229,229, 255,226,226, 255,223,223, 255,220,220, 255,217,217,
+ 255,214,214, 255,211,211, 255,208,208, 255,205,205, 255,202,202, 255,199,199,
+ 255,196,196, 255,193,193, 255,190,190, 255,187,187, 255,184,184, 255,181,181,
+ 255,178,178, 255,175,175, 255,172,172, 255,169,169, 255,166,166, 255,163,163,
+ 255,160,160, 255,157,157, 255,154,154, 255,151,151, 255,148,148, 255,145,145,
+ 255,142,142, 255,139,139, 255,136,136, 255,133,133, 255,130,130, 255,127,127,
+ 255,124,124, 255,121,121, 255,118,118, 255,115,115, 255,112,112, 255,109,109,
+ 255,106,106, 255,103,103, 255,100,100, 255, 97, 97, 255, 94, 94, 255, 91, 91,
+ 255, 88, 88, 255, 85, 85, 255, 82, 82, 255, 79, 79, 255, 76, 76, 255, 73, 73,
+ 255, 70, 70, 255, 67, 67, 255, 64, 64, 255, 61, 61, 255, 58, 58, 255, 55, 55,
+ 255, 52, 52, 255, 49, 49, 255, 46, 46, 255, 43, 43, 255, 40, 40, 255, 37, 37,
+ 255, 34, 34, 255, 31, 31, 255, 28, 28, 255, 25, 25, 255, 22, 22, 255, 19, 19,
+ 255, 16, 16, 255, 13, 13, 255, 10, 10, 255,  7,  7, 255,  4,  4, 255,  1,  1,
+ 253,  0,  0, 250,  0,  0, 247,  0,  0, 244,  0,  0, 241,  0,  0, 238,  0,  0,
+ 235,  0,  0, 232,  0,  0, 229,  0,  0, 226,  0,  0, 223,  0,  0, 220,  0,  0,
+ 217,  0,  0, 214,  0,  0, 211,  0,  0, 208,  0,  0, 205,  0,  0, 202,  0,  0,
+ 199,  0,  0, 196,  0,  0, 193,  0,  0, 190,  0,  0, 187,  0,  0, 184,  0,  0,
+ 181,  0,  0, 178,  0,  0, 175,  0,  0, 172,  0,  0, 169,  0,  0, 166,  0,  0,
+ 163,  0,  0, 160,  0,  0, 157,  0,  0, 154,  0,  0, 151,  0,  0, 148,  0,  0,
+ 145,  0,  0, 142,  0,  0, 139,  0,  0, 136,  0,  0, 133,  0,  0, 130,  0,  0,
+                                                                127,  0,  0 };
diff --git a/src/colormaps_bright.h b/src/colormaps_bright.h
new file mode 100644
index 0000000..f2ba98e
--- /dev/null
+++ b/src/colormaps_bright.h
@@ -0,0 +1,44 @@
+static int cmap_bright[] = { 232,151,254, 230,143,254, 228,135,253,
+ 226,126,253, 225,118,253, 223,109,253, 221,101,253, 219, 93,253, 216, 84,252,
+ 213, 76,252, 210, 67,252, 207, 59,252, 204, 51,251, 201, 42,251, 197, 35,251,
+ 193, 30,250, 188, 25,250, 184, 20,249, 179, 15,248, 175, 10,248, 170,  5,247,
+ 166,  1,247, 162,  1,246, 158,  1,245, 154,  0,244, 150,  0,243, 145,  0,242,
+ 141,  0,241, 138,  0,240, 134,  0,239, 131,  0,238, 128,  0,238, 124,  0,237,
+ 121,  0,236, 118,  0,235, 115,  1,234, 113,  4,234, 111,  7,233, 108,  9,232,
+ 106, 12,232, 104, 15,231, 102, 18,230, 100, 22,230,  99, 26,230,  98, 31,231,
+  97, 35,231,  95, 40,231,  94, 44,231,  93, 49,231,  92, 54,232,  91, 59,232,
+  91, 64,233,  90, 69,234,  89, 74,235,  89, 79,236,  88, 84,236,  87, 89,238,
+  87, 95,239,  86,101,240,  86,107,242,  85,113,243,  85,118,244,  84,124,246,
+  84,131,247,  84,137,248,  83,143,249,  83,149,251,  83,156,252,  82,162,253,
+  82,168,254,  81,174,254,  81,179,254,  80,185,254,  79,190,254,  79,196,254,
+  78,202,254,  78,207,254,  76,211,252,  75,215,249,  74,219,247,  73,223,245,
+  72,227,243,  71,231,241,  69,235,239,  67,238,235,  65,240,231,  62,243,227,
+  60,245,223,  58,248,219,  55,251,215,  53,252,211,  50,253,206,  47,253,201,
+  44,253,195,  42,254,190,  39,254,185,  36,254,180,  33,254,174,  31,254,168,
+  29,253,162,  26,253,156,  24,252,150,  22,252,144,  19,252,138,  18,250,131,
+  16,248,124,  15,246,118,  14,243,111,  12,241,104,  11,239, 98,  10,236, 91,
+   9,234, 85,   8,231, 78,   8,229, 72,   7,226, 66,   7,224, 60,   6,221, 54,
+   6,219, 48,   7,217, 43,   7,216, 38,   8,214, 33,   9,213, 29,  10,211, 24,
+  10,210, 19,  11,208, 15,  14,209, 12,  16,210, 10,  19,211,  8,  21,212,  6,
+  24,213,  4,  27,214,  2,  29,215,  0,  34,217,  0,  39,220,  0,  44,222,  0,
+  48,224,  0,  53,227,  0,  58,229,  0,  63,231,  0,  69,234,  0,  74,237,  0,
+  80,239,  0,  86,242,  0,  92,245,  0,  98,247,  0, 104,250,  0, 111,250,  0,
+ 118,251,  0, 125,252,  0, 132,253,  0, 139,253,  0, 146,254,  0, 153,255,  0,
+ 159,255,  0, 165,255,  0, 171,255,  0, 177,255,  0, 183,255,  0, 189,255,  0,
+ 195,255,  0, 200,255,  0, 204,255,  0, 209,255,  0, 214,255,  0, 219,255,  0,
+ 224,255,  0, 227,254,  0, 230,252,  0, 233,250,  0, 235,249,  0, 238,247,  0,
+ 241,245,  0, 243,244,  0, 245,240,  0, 247,236,  0, 248,232,  0, 250,228,  0,
+ 251,224,  1, 253,220,  1, 254,216,  1, 254,211,  1, 254,206,  1, 254,200,  1,
+ 254,195,  1, 254,189,  1, 254,184,  1, 254,179,  2, 255,173,  1, 255,168,  1,
+ 255,162,  1, 255,157,  0, 255,151,  0, 255,145,  0, 254,140,  0, 254,134,  0,
+ 253,129,  0, 252,124,  0, 251,118,  0, 250,113,  0, 249,108,  0, 248,102,  0,
+ 247, 98,  0, 245, 93,  0, 244, 88,  0, 243, 83,  0, 241, 79,  0, 240, 74,  0,
+ 239, 70,  0, 237, 66,  0, 235, 63,  0, 234, 59,  0, 232, 56,  0, 230, 53,  0,
+ 229, 49,  0, 227, 46,  0, 225, 45,  2, 224, 43,  4, 222, 42,  5, 221, 40,  7,
+ 219, 38,  9, 217, 37, 11, 216, 36, 13, 215, 37, 16, 215, 38, 20, 214, 38, 23,
+ 213, 39, 26, 212, 40, 29, 212, 40, 33, 212, 42, 36, 212, 46, 41, 213, 49, 45,
+ 213, 52, 49, 214, 56, 53, 214, 59, 57, 215, 62, 62, 216, 67, 66, 218, 73, 71,
+ 219, 79, 76, 221, 85, 81, 223, 90, 86, 224, 96, 91, 226,102, 96, 228,108,100,
+ 231,115,104, 233,121,107, 235,128,111, 238,134,115, 240,141,118, 243,147,122,
+ 245,153,124, 246,159,125, 248,165,126, 250,171,128, 251,177,129, 253,183,130,
+                                                                255,189,132 };
diff --git a/src/colormaps_jaisn2.h b/src/colormaps_jaisn2.h
new file mode 100644
index 0000000..f2294f9
--- /dev/null
+++ b/src/colormaps_jaisn2.h
@@ -0,0 +1,44 @@
+static int cmap_jaisn2[] = {  33,  0,127,  30,  0,133,  28,  0,139,
+  25,  0,144,  21,  0,150,  18,  0,155,  14,  0,160,  10,  0,165,   5,  0,169,
+   1,  0,174,   0,  3,178,   0,  8,182,   0, 13,186,   0, 18,190,   0, 23,194,
+   0, 29,197,   0, 34,201,   0, 40,204,   0, 46,207,   0, 51,210,   0, 57,213,
+   0, 63,216,   0, 68,219,   0, 74,221,   0, 80,224,   0, 85,226,   0, 91,228,
+   0, 96,230,   0,102,232,   0,107,234,   0,112,236,   0,118,237,   0,123,239,
+   0,128,240,   0,133,242,   0,138,243,   0,142,244,   0,147,245,   0,152,246,
+   0,156,247,   0,160,248,   0,165,249,   0,169,249,   0,173,250,   0,177,251,
+   0,181,251,   0,185,252,   0,188,252,   0,192,253,   0,196,253,   0,199,253,
+   0,203,253,   0,206,254,   0,210,254,   0,213,254,   0,217,254,   0,220,254,
+   0,223,254,   0,227,254,   0,230,254,   0,233,254,   0,237,254,   0,240,254,
+   0,243,254,   0,247,255,   0,250,255,   0,254,255,   0,255,251,   0,255,248,
+   0,255,244,   0,255,240,   0,255,236,   0,255,232,   0,255,228,   0,255,224,
+   0,255,220,   0,255,216,   0,255,211,   0,255,207,   0,255,202,   0,255,197,
+   0,255,193,   0,255,188,   0,255,183,   0,255,178,   0,255,172,   0,255,167,
+   0,255,162,   0,255,156,   0,255,151,   0,255,145,   0,255,139,   0,255,133,
+   0,255,128,   2,255,123,   5,255,118,   9,255,114,  13,255,111,  19,255,109,
+  25,255,107,  32,255,106,  40,255,105,  49,255,106,  58,255,107,  67,255,110,
+  77,255,113,  88,255,117,  99,255,121, 110,255,127, 121,255,133, 132,255,140,
+ 143,255,147, 154,255,155, 166,255,165, 178,255,175, 190,255,185, 201,255,195,
+ 210,255,204, 219,255,213, 227,255,221, 233,255,228, 239,255,234, 244,255,240,
+ 247,255,245, 250,255,249, 252,255,251, 254,255,253, 254,255,254, 254,255,254,
+ 254,255,253, 253,255,251, 251,255,249, 250,255,245, 248,255,240, 245,255,234,
+ 243,255,228, 240,255,221, 238,255,213, 236,255,204, 233,255,195, 231,255,185,
+ 230,255,175, 228,255,165, 227,255,154, 226,255,143, 225,255,132, 225,255,121,
+ 225,255,110, 225,255, 99, 226,255, 88, 227,255, 77, 228,255, 67, 230,255, 58,
+ 232,255, 49, 235,255, 40, 237,255, 32, 240,255, 25, 243,255, 19, 246,255, 13,
+ 249,255,  9, 252,255,  5, 255,253,  2, 255,250,  0, 255,246,  0, 255,243,  0,
+ 255,240,  0, 255,237,  0, 255,233,  0, 255,230,  0, 255,227,  0, 255,223,  0,
+ 255,220,  0, 255,217,  0, 255,214,  0, 255,210,  0, 255,207,  0, 255,203,  0,
+ 255,200,  0, 255,196,  0, 255,193,  0, 255,189,  0, 255,185,  0, 255,182,  0,
+ 255,178,  0, 255,174,  0, 255,170,  0, 255,166,  0, 255,162,  0, 255,158,  0,
+ 255,153,  0, 255,149,  0, 255,144,  0, 254,140,  0, 254,135,  0, 254,130,  0,
+ 254,125,  0, 254,120,  0, 254,115,  0, 254,109,  0, 254,104,  0, 254, 98,  0,
+ 254, 93,  0, 254, 87,  0, 254, 81,  0, 253, 75,  0, 253, 69,  0, 253, 63,  0,
+ 253, 57,  0, 252, 50,  0, 252, 44,  0, 251, 37,  0, 251, 31,  0, 250, 24,  0,
+ 249, 18,  0, 249, 11,  0, 248,  4,  0, 247,  0,  2, 246,  0,  9, 245,  0, 15,
+ 244,  0, 22, 243,  0, 29, 242,  0, 36, 240,  0, 42, 239,  0, 49, 237,  0, 55,
+ 236,  0, 62, 234,  0, 68, 232,  0, 74, 230,  0, 80, 228,  0, 86, 226,  0, 92,
+ 224,  0, 97, 221,  0,103, 219,  0,108, 216,  0,113, 213,  0,117, 210,  0,122,
+ 207,  0,126, 204,  0,130, 201,  0,133, 197,  0,136, 194,  0,139, 190,  0,141,
+ 186,  0,144, 182,  0,145, 178,  0,147, 174,  0,148, 169,  0,148, 165,  0,148,
+ 160,  0,148, 155,  0,147, 150,  0,146, 144,  0,144, 136,  0,139, 127,  0,133,
+                                                                119,  0,127 };
diff --git a/src/colormaps_jaisnb.h b/src/colormaps_jaisnb.h
new file mode 100644
index 0000000..c5174f7
--- /dev/null
+++ b/src/colormaps_jaisnb.h
@@ -0,0 +1,44 @@
+static int cmap_jaisnb[] = { 125,  0,127, 127,  0,133, 129,  0,139,
+ 131,  0,144, 132,  0,150, 132,  0,155, 133,  0,160, 132,  0,165, 132,  0,169,
+ 130,  0,174, 129,  0,178, 127,  0,182, 125,  0,186, 122,  0,190, 119,  0,194,
+ 116,  0,197, 112,  0,201, 108,  0,204, 104,  0,207,  99,  0,210,  94,  0,213,
+  89,  0,216,  84,  0,219,  79,  0,221,  73,  0,224,  67,  0,226,  61,  0,228,
+  55,  0,230,  49,  0,232,  43,  0,234,  37,  0,236,  30,  0,237,  24,  0,239,
+  17,  0,240,  10,  0,242,   4,  0,243,   0,  2,244,   0,  8,245,   0, 15,246,
+   0, 21,247,   0, 28,248,   0, 34,249,   0, 41,249,   0, 47,250,   0, 53,251,
+   0, 59,251,   0, 65,252,   0, 71,252,   0, 77,253,   0, 83,253,   0, 88,253,
+   0, 94,253,   0, 99,254,   0,104,254,   0,109,254,   0,114,254,   0,119,254,
+   0,124,254,   0,129,254,   0,133,254,   0,138,254,   1,142,254,   1,146,254,
+   2,150,254,   2,154,255,   3,158,255,   4,162,255,   5,166,255,   6,170,255,
+   7,173,255,   8,177,255,   9,180,255,  10,183,255,  12,187,255,  13,190,255,
+  15,193,255,  16,196,255,  18,199,255,  20,202,255,  21,204,255,  23,207,255,
+  25,210,255,  28,212,255,  30,215,255,  32,217,255,  34,219,255,  37,222,255,
+  39,224,255,  42,226,255,  45,228,255,  47,231,255,  50,233,255,  53,235,255,
+  56,237,255,  59,239,255,  63,241,255,  66,243,255,  69,245,255,  73,247,255,
+  76,248,255,  80,250,255,  84,252,255,  88,254,255,  91,255,254,  96,255,252,
+ 100,255,251, 104,255,249, 108,255,248, 113,255,247, 117,255,245, 122,255,244,
+ 127,255,243, 132,255,242, 137,255,242, 142,255,241, 148,255,240, 154,255,240,
+ 159,255,239, 165,255,239, 172,255,239, 178,255,240, 185,255,240, 192,255,241,
+ 200,255,242, 209,255,243, 218,255,245, 229,255,248, 243,255,251, 244,255,243,
+ 232,255,229, 223,255,218, 216,255,209, 210,255,200, 205,255,192, 200,255,185,
+ 196,255,178, 192,255,172, 188,255,165, 186,255,159, 183,255,154, 181,255,148,
+ 179,255,142, 178,255,137, 176,255,132, 175,255,127, 175,255,122, 174,255,117,
+ 174,255,113, 175,255,108, 175,255,104, 175,255,100, 176,255, 96, 177,255, 91,
+ 178,255, 88, 180,255, 84, 181,255, 80, 183,255, 76, 185,255, 73, 187,255, 69,
+ 189,255, 66, 191,255, 63, 193,255, 59, 196,255, 56, 198,255, 53, 201,255, 50,
+ 204,255, 47, 206,255, 45, 209,255, 42, 212,255, 39, 215,255, 37, 218,255, 34,
+ 221,255, 32, 224,255, 30, 227,255, 28, 230,255, 25, 233,255, 23, 236,255, 21,
+ 239,255, 20, 242,255, 18, 245,255, 16, 248,255, 15, 251,255, 13, 254,255, 12,
+ 255,252, 10, 255,249,  9, 255,246,  8, 255,243,  7, 255,240,  6, 255,237,  5,
+ 255,234,  4, 255,231,  3, 255,228,  2, 254,225,  2, 254,223,  1, 254,220,  1,
+ 254,217,  0, 254,214,  0, 254,211,  0, 254,208,  0, 254,204,  0, 254,201,  0,
+ 254,198,  0, 254,195,  0, 254,192,  0, 253,188,  0, 253,185,  0, 253,181,  0,
+ 253,178,  0, 252,174,  0, 252,170,  0, 251,166,  0, 251,162,  0, 250,158,  0,
+ 249,154,  0, 249,150,  0, 248,145,  0, 247,141,  0, 246,136,  0, 245,131,  0,
+ 244,126,  0, 243,121,  0, 242,116,  0, 240,111,  0, 239,106,  0, 237,100,  0,
+ 236, 95,  0, 234, 90,  0, 232, 84,  0, 230, 78,  0, 228, 73,  0, 226, 67,  0,
+ 224, 61,  0, 221, 55,  0, 219, 49,  0, 216, 44,  0, 213, 38,  0, 210, 32,  0,
+ 207, 26,  0, 204, 21,  0, 201, 15,  0, 197, 10,  0, 194,  4,  0, 190,  0,  0,
+ 186,  0,  5, 182,  0, 10, 178,  0, 14, 174,  0, 19, 169,  0, 23, 165,  0, 27,
+ 160,  0, 31, 155,  0, 34, 150,  0, 37, 144,  0, 40, 139,  0, 43, 133,  0, 45,
+                                                                127,  0, 46 };
diff --git a/src/colormaps_jaisnc.h b/src/colormaps_jaisnc.h
new file mode 100644
index 0000000..93279e1
--- /dev/null
+++ b/src/colormaps_jaisnc.h
@@ -0,0 +1,44 @@
+static int cmap_jaisnc[] = {  87,  0,127,  88,  0,133,  88,  0,139,
+  87,  0,144,  86,  0,150,  85,  0,155,  83,  0,160,  81,  0,165,  78,  0,169,
+  75,  0,174,  72,  0,178,  68,  0,182,  65,  0,186,  60,  0,190,  56,  0,194,
+  51,  0,197,  46,  0,201,  41,  0,204,  36,  0,207,  31,  0,210,  25,  0,213,
+  19,  0,216,  13,  0,219,   8,  0,221,   2,  0,224,   0,  4,226,   0, 10,228,
+   0, 16,230,   0, 22,232,   0, 28,234,   0, 34,236,   0, 41,237,   0, 47,239,
+   0, 53,240,   0, 59,242,   0, 65,243,   0, 71,244,   0, 77,245,   0, 83,246,
+   0, 88,247,   0, 94,248,   0, 99,249,   0,105,249,   0,110,250,   0,115,251,
+   0,120,251,   0,125,252,   0,130,252,   0,134,253,   0,139,253,   0,143,253,
+   0,148,253,   0,152,254,   0,156,254,   0,160,254,   0,163,254,   0,167,254,
+   0,171,254,   0,174,254,   0,178,254,   0,181,254,   1,185,254,   1,188,254,
+   2,191,254,   2,194,255,   3,197,255,   4,200,255,   5,203,255,   6,206,255,
+   7,209,255,   8,212,255,   9,215,255,  10,217,255,  12,220,255,  13,223,255,
+  15,226,255,  16,228,255,  18,231,255,  20,233,255,  21,236,255,  23,239,255,
+  25,241,255,  28,244,255,  30,246,255,  32,249,255,  34,251,255,  37,254,255,
+  39,255,253,  42,255,251,  45,255,248,  47,255,246,  50,255,244,  53,255,241,
+  56,255,239,  59,255,237,  63,255,235,  66,255,233,  69,255,231,  73,255,229,
+  76,255,227,  80,255,225,  84,255,223,  88,255,221,  91,255,220,  96,255,218,
+ 100,255,217, 104,255,216, 108,255,215, 113,255,214, 117,255,213, 122,255,212,
+ 127,255,212, 132,255,212, 137,255,212, 142,255,212, 148,255,212, 154,255,213,
+ 159,255,214, 165,255,215, 172,255,217, 178,255,218, 185,255,221, 192,255,223,
+ 200,255,226, 209,255,230, 218,255,234, 229,255,240, 243,255,248, 248,255,243,
+ 240,255,229, 234,255,218, 230,255,209, 226,255,200, 223,255,192, 221,255,185,
+ 218,255,178, 217,255,172, 215,255,165, 214,255,159, 213,255,154, 212,255,148,
+ 212,255,142, 212,255,137, 212,255,132, 212,255,127, 212,255,122, 213,255,117,
+ 214,255,113, 215,255,108, 216,255,104, 217,255,100, 218,255, 96, 220,255, 91,
+ 221,255, 88, 223,255, 84, 225,255, 80, 227,255, 76, 229,255, 73, 231,255, 69,
+ 233,255, 66, 235,255, 63, 237,255, 59, 239,255, 56, 241,255, 53, 244,255, 50,
+ 246,255, 47, 248,255, 45, 251,255, 42, 253,255, 39, 255,254, 37, 255,251, 34,
+ 255,249, 32, 255,246, 30, 255,244, 28, 255,241, 25, 255,239, 23, 255,236, 21,
+ 255,233, 20, 255,231, 18, 255,228, 16, 255,226, 15, 255,223, 13, 255,220, 12,
+ 255,217, 10, 255,215,  9, 255,212,  8, 255,209,  7, 255,206,  6, 255,203,  5,
+ 255,200,  4, 255,197,  3, 255,194,  2, 254,191,  2, 254,188,  1, 254,185,  1,
+ 254,181,  0, 254,178,  0, 254,174,  0, 254,171,  0, 254,167,  0, 254,163,  0,
+ 254,160,  0, 254,156,  0, 254,152,  0, 253,148,  0, 253,143,  0, 253,139,  0,
+ 253,134,  0, 252,130,  0, 252,125,  0, 251,120,  0, 251,115,  0, 250,110,  0,
+ 249,105,  0, 249, 99,  0, 248, 94,  0, 247, 88,  0, 246, 83,  0, 245, 77,  0,
+ 244, 71,  0, 243, 65,  0, 242, 59,  0, 240, 53,  0, 239, 47,  0, 237, 41,  0,
+ 236, 34,  0, 234, 28,  0, 232, 22,  0, 230, 16,  0, 228, 10,  0, 226,  4,  0,
+ 224,  0,  2, 221,  0,  8, 219,  0, 13, 216,  0, 19, 213,  0, 25, 210,  0, 31,
+ 207,  0, 36, 204,  0, 41, 201,  0, 46, 197,  0, 51, 194,  0, 56, 190,  0, 60,
+ 186,  0, 65, 182,  0, 68, 178,  0, 72, 174,  0, 75, 169,  0, 78, 165,  0, 81,
+ 160,  0, 83, 155,  0, 85, 150,  0, 86, 144,  0, 87, 139,  0, 88, 133,  0, 88,
+                                                                127,  0, 87 };
diff --git a/src/colormaps_jaisnd.h b/src/colormaps_jaisnd.h
new file mode 100644
index 0000000..2e5227a
--- /dev/null
+++ b/src/colormaps_jaisnd.h
@@ -0,0 +1,44 @@
+static int cmap_jaisnd[] = {  46,  0,127,  45,  0,133,  43,  0,139,
+  40,  0,144,  37,  0,150,  34,  0,155,  31,  0,160,  27,  0,165,  23,  0,169,
+  19,  0,174,  14,  0,178,  10,  0,182,   5,  0,186,   0,  0,190,   0,  4,194,
+   0, 10,197,   0, 15,201,   0, 21,204,   0, 26,207,   0, 32,210,   0, 38,213,
+   0, 44,216,   0, 49,219,   0, 55,221,   0, 61,224,   0, 67,226,   0, 73,228,
+   0, 78,230,   0, 84,232,   0, 90,234,   0, 95,236,   0,100,237,   0,106,239,
+   0,111,240,   0,116,242,   0,121,243,   0,126,244,   0,131,245,   0,136,246,
+   0,141,247,   0,145,248,   0,150,249,   0,154,249,   0,158,250,   0,162,251,
+   0,166,251,   0,170,252,   0,174,252,   0,178,253,   0,181,253,   0,185,253,
+   0,188,253,   0,192,254,   0,195,254,   0,198,254,   0,201,254,   0,204,254,
+   0,208,254,   0,211,254,   0,214,254,   0,217,254,   1,220,254,   1,223,254,
+   2,225,254,   2,228,255,   3,231,255,   4,234,255,   5,237,255,   6,240,255,
+   7,243,255,   8,246,255,   9,249,255,  10,252,255,  12,255,254,  13,255,251,
+  15,255,248,  16,255,245,  18,255,242,  20,255,239,  21,255,236,  23,255,233,
+  25,255,230,  28,255,227,  30,255,224,  32,255,221,  34,255,218,  37,255,215,
+  39,255,212,  42,255,209,  45,255,206,  47,255,204,  50,255,201,  53,255,198,
+  56,255,196,  59,255,193,  63,255,191,  66,255,189,  69,255,187,  73,255,185,
+  76,255,183,  80,255,181,  84,255,180,  88,255,178,  91,255,177,  96,255,176,
+ 100,255,175, 104,255,175, 108,255,175, 113,255,174, 117,255,174, 122,255,175,
+ 127,255,175, 132,255,176, 137,255,178, 142,255,179, 148,255,181, 154,255,183,
+ 159,255,186, 165,255,188, 172,255,192, 178,255,196, 185,255,200, 192,255,205,
+ 200,255,210, 209,255,216, 218,255,223, 229,255,232, 243,255,244, 251,255,243,
+ 248,255,229, 245,255,218, 243,255,209, 242,255,200, 241,255,192, 240,255,185,
+ 240,255,178, 239,255,172, 239,255,165, 239,255,159, 240,255,154, 240,255,148,
+ 241,255,142, 242,255,137, 242,255,132, 243,255,127, 244,255,122, 245,255,117,
+ 247,255,113, 248,255,108, 249,255,104, 251,255,100, 252,255, 96, 254,255, 91,
+ 255,254, 88, 255,252, 84, 255,250, 80, 255,248, 76, 255,247, 73, 255,245, 69,
+ 255,243, 66, 255,241, 63, 255,239, 59, 255,237, 56, 255,235, 53, 255,233, 50,
+ 255,231, 47, 255,228, 45, 255,226, 42, 255,224, 39, 255,222, 37, 255,219, 34,
+ 255,217, 32, 255,215, 30, 255,212, 28, 255,210, 25, 255,207, 23, 255,204, 21,
+ 255,202, 20, 255,199, 18, 255,196, 16, 255,193, 15, 255,190, 13, 255,187, 12,
+ 255,183, 10, 255,180,  9, 255,177,  8, 255,173,  7, 255,170,  6, 255,166,  5,
+ 255,162,  4, 255,158,  3, 255,154,  2, 254,150,  2, 254,146,  1, 254,142,  1,
+ 254,138,  0, 254,133,  0, 254,129,  0, 254,124,  0, 254,119,  0, 254,114,  0,
+ 254,109,  0, 254,104,  0, 254, 99,  0, 253, 94,  0, 253, 88,  0, 253, 83,  0,
+ 253, 77,  0, 252, 71,  0, 252, 65,  0, 251, 59,  0, 251, 53,  0, 250, 47,  0,
+ 249, 41,  0, 249, 34,  0, 248, 28,  0, 247, 21,  0, 246, 15,  0, 245,  8,  0,
+ 244,  2,  0, 243,  0,  4, 242,  0, 10, 240,  0, 17, 239,  0, 24, 237,  0, 30,
+ 236,  0, 37, 234,  0, 43, 232,  0, 49, 230,  0, 55, 228,  0, 61, 226,  0, 67,
+ 224,  0, 73, 221,  0, 79, 219,  0, 84, 216,  0, 89, 213,  0, 94, 210,  0, 99,
+ 207,  0,104, 204,  0,108, 201,  0,112, 197,  0,116, 194,  0,119, 190,  0,122,
+ 186,  0,125, 182,  0,127, 178,  0,129, 174,  0,130, 169,  0,132, 165,  0,132,
+ 160,  0,133, 155,  0,132, 150,  0,132, 144,  0,131, 139,  0,129, 133,  0,127,
+                                                                127,  0,125 };
diff --git a/src/colormaps_jaison.h b/src/colormaps_jaison.h
new file mode 100644
index 0000000..ebfb592
--- /dev/null
+++ b/src/colormaps_jaison.h
@@ -0,0 +1,44 @@
+static int cmap_jaison[] = { 125,  0,127, 127,  0,133, 129,  0,139,
+ 131,  0,144, 132,  0,150, 132,  0,155, 133,  0,160, 132,  0,165, 132,  0,169,
+ 130,  0,174, 129,  0,178, 127,  0,182, 125,  0,186, 122,  0,190, 119,  0,194,
+ 116,  0,197, 112,  0,201, 108,  0,204, 104,  0,207,  99,  0,210,  94,  0,213,
+  89,  0,216,  84,  0,219,  79,  0,221,  73,  0,224,  67,  0,226,  61,  0,228,
+  55,  0,230,  49,  0,232,  43,  0,234,  36,  0,236,  30,  0,237,  23,  0,239,
+  17,  0,240,  10,  0,242,   3,  0,243,   0,  2,244,   0,  9,245,   0, 16,246,
+   0, 22,247,   0, 29,248,   0, 35,249,   0, 42,249,   0, 48,250,   0, 55,251,
+   0, 61,251,   0, 67,252,   0, 73,252,   0, 79,253,   0, 85,253,   0, 91,253,
+   0, 97,253,   0,102,254,   0,108,254,   0,113,254,   0,118,254,   0,123,254,
+   0,128,254,   0,133,254,   0,138,254,   0,143,254,   0,147,254,   0,152,254,
+   0,156,254,   0,160,255,   0,164,255,   0,168,255,   0,172,255,   0,176,255,
+   0,180,255,   0,184,255,   0,188,255,   0,191,255,   0,195,255,   0,198,255,
+   0,202,255,   0,205,255,   0,209,255,   0,212,255,   0,215,255,   0,218,255,
+   0,222,255,   0,225,255,   0,228,255,   0,232,255,   0,235,255,   0,238,255,
+   0,241,255,   0,245,255,   0,248,255,   0,252,255,   0,255,254,   0,255,251,
+   0,255,247,   2,255,244,   5,255,240,   9,255,237,  13,255,234,  19,255,231,
+  25,255,228,  32,255,225,  40,255,223,  49,255,221,  58,255,219,  67,255,217,
+  77,255,216,  88,255,216,  99,255,215, 110,255,215, 121,255,216, 132,255,217,
+ 143,255,218, 154,255,220, 165,255,221, 175,255,224, 185,255,226, 195,255,229,
+ 204,255,232, 213,255,235, 221,255,238, 228,255,241, 234,255,244, 240,255,246,
+ 245,255,249, 249,255,251, 251,255,253, 253,255,254, 254,255,254, 254,255,254,
+ 253,255,254, 251,255,252, 249,255,250, 245,255,246, 240,255,242, 234,255,237,
+ 228,255,231, 221,255,223, 213,255,215, 204,255,205, 195,255,195, 188,255,185,
+ 180,255,175, 173,255,165, 165,255,154, 159,255,143, 152,255,132, 147,255,121,
+ 141,255,110, 137,255, 99, 133,255, 88, 130,255, 77, 128,255, 67, 126,255, 58,
+ 126,255, 49, 126,255, 40, 126,255, 32, 128,255, 25, 130,255, 19, 133,255, 13,
+ 136,255,  9, 140,255,  5, 145,255,  2, 149,255,  0, 155,255,  0, 160,255,  0,
+ 165,255,  0, 171,255,  0, 176,255,  0, 181,255,  0, 186,255,  0, 191,255,  0,
+ 196,255,  0, 200,255,  0, 205,255,  0, 209,255,  0, 214,255,  0, 218,255,  0,
+ 222,255,  0, 227,255,  0, 231,255,  0, 235,255,  0, 239,255,  0, 242,255,  0,
+ 246,255,  0, 250,255,  0, 253,255,  0, 255,252,  0, 255,249,  0, 255,245,  0,
+ 255,242,  0, 255,238,  0, 255,235,  0, 254,232,  0, 254,228,  0, 254,225,  0,
+ 254,222,  0, 254,218,  0, 254,215,  0, 254,212,  0, 254,208,  0, 254,205,  0,
+ 254,202,  0, 254,198,  0, 254,195,  0, 253,191,  0, 253,187,  0, 253,184,  0,
+ 253,180,  0, 252,176,  0, 252,172,  0, 251,168,  0, 251,164,  0, 250,160,  0,
+ 249,155,  0, 249,151,  0, 248,146,  0, 247,142,  0, 246,137,  0, 245,132,  0,
+ 244,127,  0, 243,122,  0, 242,117,  0, 240,112,  0, 239,106,  0, 237,101,  0,
+ 236, 95,  0, 234, 90,  0, 232, 84,  0, 230, 78,  0, 228, 73,  0, 226, 67,  0,
+ 224, 61,  0, 221, 55,  0, 219, 49,  0, 216, 44,  0, 213, 38,  0, 210, 32,  0,
+ 207, 26,  0, 204, 21,  0, 201, 15,  0, 197, 10,  0, 194,  4,  0, 190,  0,  0,
+ 186,  0,  5, 182,  0, 10, 178,  0, 14, 174,  0, 19, 169,  0, 23, 165,  0, 27,
+ 160,  0, 31, 155,  0, 34, 150,  0, 37, 144,  0, 40, 139,  0, 43, 133,  0, 45,
+                                                                127,  0, 46 };
diff --git a/src/colormaps_jet.h b/src/colormaps_jet.h
new file mode 100644
index 0000000..997f21b
--- /dev/null
+++ b/src/colormaps_jet.h
@@ -0,0 +1,37 @@
+static int cmap_jet[] = {      0,  0,127,   0,  0,131,   0,  0,135,   0,  0,139,
+     0,  0,143,   0,  0,147,   0,  0,151,   0,  0,155,   0,  0,159,   0,  0,163,   0,  0,167,
+     0,  0,171,   0,  0,175,   0,  0,179,   0,  0,183,   0,  0,187,   0,  0,191,   0,  0,195,
+     0,  0,199,   0,  0,203,   0,  0,207,   0,  0,211,   0,  0,215,   0,  0,219,   0,  0,223,
+     0,  0,227,   0,  0,231,   0,  0,235,   0,  0,239,   0,  0,243,   0,  0,247,   0,  0,251,
+     0,  0,255,   0,  4,255,   0,  8,255,   0, 12,255,   0, 16,255,   0, 20,255,   0, 24,255,
+     0, 28,255,   0, 32,255,   0, 36,255,   0, 40,255,   0, 44,255,   0, 48,255,   0, 52,255,
+     0, 56,255,   0, 60,255,   0, 64,255,   0, 68,255,   0, 72,255,   0, 76,255,   0, 80,255,
+     0, 84,255,   0, 88,255,   0, 92,255,   0, 96,255,   0,100,255,   0,104,255,   0,108,255,
+     0,112,255,   0,116,255,   0,120,255,   0,124,255,   0,128,255,   0,132,255,   0,136,255,
+     0,140,255,   0,144,255,   0,148,255,   0,152,255,   0,156,255,   0,160,255,   0,164,255,
+     0,168,255,   0,172,255,   0,176,255,   0,180,255,   0,184,255,   0,188,255,   0,192,255,
+     0,196,255,   0,200,255,   0,204,255,   0,208,255,   0,212,255,   0,216,255,   0,220,255,
+     0,224,255,   0,228,255,   0,232,255,   0,236,255,   0,240,255,   0,244,255,   0,248,255,
+     0,252,255,   1,255,253,   5,255,249,   9,255,245,  13,255,241,  17,255,237,  21,255,233,
+    25,255,229,  29,255,225,  33,255,221,  37,255,217,  41,255,213,  45,255,209,  49,255,205,
+    53,255,201,  57,255,197,  61,255,193,  65,255,189,  69,255,185,  73,255,181,  77,255,177,
+    81,255,173,  85,255,169,  89,255,165,  93,255,161,  97,255,157, 101,255,153, 105,255,149,
+   109,255,145, 113,255,141, 117,255,137, 121,255,133, 125,255,129, 129,255,125, 133,255,121,
+   137,255,117, 141,255,113, 145,255,109, 149,255,105, 153,255,101, 157,255, 97, 161,255, 93,
+   165,255, 89, 169,255, 85, 173,255, 81, 177,255, 77, 181,255, 73, 185,255, 69, 189,255, 65,
+   193,255, 61, 197,255, 57, 201,255, 53, 205,255, 49, 209,255, 45, 213,255, 41, 217,255, 37,
+   221,255, 33, 225,255, 29, 229,255, 25, 233,255, 21, 237,255, 17, 241,255, 13, 245,255,  9,
+   249,255,  5, 253,255,  1, 255,252,  0, 255,248,  0, 255,244,  0, 255,240,  0, 255,236,  0,
+   255,232,  0, 255,228,  0, 255,224,  0, 255,220,  0, 255,216,  0, 255,212,  0, 255,208,  0,
+   255,204,  0, 255,200,  0, 255,196,  0, 255,192,  0, 255,188,  0, 255,184,  0, 255,180,  0,
+   255,176,  0, 255,172,  0, 255,168,  0, 255,164,  0, 255,160,  0, 255,156,  0, 255,152,  0,
+   255,148,  0, 255,144,  0, 255,140,  0, 255,136,  0, 255,132,  0, 255,128,  0, 255,124,  0,
+   255,120,  0, 255,116,  0, 255,112,  0, 255,108,  0, 255,104,  0, 255,100,  0, 255, 96,  0,
+   255, 92,  0, 255, 88,  0, 255, 84,  0, 255, 80,  0, 255, 76,  0, 255, 72,  0, 255, 68,  0,
+   255, 64,  0, 255, 60,  0, 255, 56,  0, 255, 52,  0, 255, 48,  0, 255, 44,  0, 255, 40,  0,
+   255, 36,  0, 255, 32,  0, 255, 28,  0, 255, 24,  0, 255, 20,  0, 255, 16,  0, 255, 12,  0,
+   255,  8,  0, 255,  4,  0, 255,  0,  0, 251,  0,  0, 247,  0,  0, 243,  0,  0, 239,  0,  0,
+   235,  0,  0, 231,  0,  0, 227,  0,  0, 223,  0,  0, 219,  0,  0, 215,  0,  0, 211,  0,  0,
+   207,  0,  0, 203,  0,  0, 199,  0,  0, 195,  0,  0, 191,  0,  0, 187,  0,  0, 183,  0,  0,
+   179,  0,  0, 175,  0,  0, 171,  0,  0, 167,  0,  0, 163,  0,  0, 159,  0,  0, 155,  0,  0,
+   151,  0,  0, 147,  0,  0, 143,  0,  0, 139,  0,  0, 135,  0,  0, 131,  0,  0, 127,  0, 0};
diff --git a/src/colormaps_manga.h b/src/colormaps_manga.h
new file mode 100644
index 0000000..8bcc2aa
--- /dev/null
+++ b/src/colormaps_manga.h
@@ -0,0 +1,40 @@
+/* A color map designed by Guillaume Roullet: a blue-to-red pattern with warming up
+   in the middle, white instead of green, and with interleaved darkened and whitened
+   stripes. Optimized for displaying detail in quasi-contour fashion. */
+static int cmap_manga[] = {  47, 55,159,  43, 52,160,  33, 43,162,  21, 32,163,
+    11, 23,165,   5, 18,166,   2, 16,168,   0, 15,169,   0, 16,170,   0, 16,170,   0, 16,170,
+     0, 16,166,   0, 16,158,   0, 15,144,   0, 13,125,   0, 12,110,   0, 12,105,   0, 13,114,
+     0, 16,133,   0, 19,154,   0, 22,170,   0, 24,180,   0, 26,186,   0, 27,189,   0, 29,191,
+     1, 31,193,   3, 33,194,   7, 38,195,  15, 45,196,  27, 57,197,  43, 71,199,  56, 82,200,
+    60, 87,201,  54, 83,202,  40, 73,203,  25, 62,204,  14, 55,205,   7, 51,206,   3, 50,207,
+     2, 50,208,   2, 52,209,   2, 53,209,   2, 55,207,   2, 55,203,   2, 54,194,   2, 51,178,
+     2, 48,160,   2, 44,145,   2, 45,141,   3, 50,152,   4, 58,171,   5, 67,191,   6, 74,206,
+     7, 80,215,   8, 84,220,   8, 88,222,  10, 92,224,  12, 96,225,  15,101,226,  21,107,227,
+    31,115,228,  46,127,228,  64,139,229,  78,149,230,  82,153,231,  75,152,232,  61,148,232,
+    47,144,233,  38,143,234,  33,144,234,  32,147,235,  33,151,235,  35,155,236,  38,159,235,
+    40,161,233,  41,162,228,  42,158,217,  41,150,201,  40,139,182,  39,131,168,  41,133,165,
+    46,145,177,  55,164,196,  63,184,216,  71,200,229,  78,211,238,  84,219,242,  89,225,244,
+    94,230,245, 100,234,246, 106,238,246, 114,242,247, 125,246,247, 139,247,246, 153,248,244,
+   164,248,243, 169,249,242, 167,249,240, 164,249,238, 161,250,236, 162,250,234, 164,250,232,
+   169,251,231, 173,251,230, 178,250,229, 183,249,228, 186,247,225, 186,240,220, 181,229,209,
+   171,212,194, 159,192,177, 151,179,165, 153,178,165, 167,191,178, 188,210,197, 207,228,215,
+   222,241,229, 232,248,237, 238,252,242, 242,253,245, 245,254,247, 248,254,249, 250,254,250,
+   251,254,252, 253,254,253, 254,254,254, 254,254,254, 254,254,254, 254,254,254, 254,254,254,
+   254,254,254, 253,254,253, 252,254,251, 250,254,250, 249,254,248, 247,254,245, 245,253,242,
+   242,252,238, 237,248,232, 229,241,222, 215,228,207, 197,210,188, 178,191,167, 165,178,153,
+   165,179,151, 177,192,159, 194,212,171, 209,229,181, 220,240,186, 225,247,186, 228,249,183,
+   229,250,178, 230,251,173, 231,251,169, 232,250,164, 234,250,162, 236,250,161, 238,249,164,
+   240,249,167, 242,249,169, 243,248,164, 244,248,153, 246,247,139, 247,246,125, 247,242,114,
+   246,238,106, 246,234,100, 245,230, 94, 244,225, 89, 242,219, 84, 238,211, 78, 229,200, 71,
+   216,184, 63, 196,164, 55, 177,145, 46, 165,133, 41, 168,131, 39, 182,139, 40, 201,150, 41,
+   217,158, 42, 228,162, 41, 233,161, 40, 235,159, 38, 236,155, 35, 235,151, 33, 235,147, 32,
+   234,144, 33, 234,143, 38, 233,144, 47, 232,148, 61, 232,152, 75, 231,153, 82, 230,149, 78,
+   229,139, 64, 228,127, 46, 228,115, 31, 227,107, 21, 226,101, 15, 225, 96, 12, 224, 92, 10,
+   222, 88,  8, 220, 84,  8, 215, 80,  7, 206, 74,  6, 191, 67,  5, 171, 58,  4, 152, 50,  3,
+   141, 45,  2, 145, 44,  2, 160, 48,  2, 178, 51,  2, 194, 54,  2, 203, 55,  2, 207, 55,  2,
+   209, 53,  2, 209, 52,  2, 208, 50,  2, 207, 50,  3, 206, 51,  7, 205, 55, 14, 204, 62, 25,
+   203, 73, 40, 202, 83, 54, 201, 87, 60, 200, 82, 56, 199, 71, 43, 197, 57, 27, 196, 45, 15,
+   195, 38,  7, 194, 33,  3, 193, 31,  1, 191, 29,  0, 189, 27,  0, 186, 26,  0, 180, 24,  0,
+   170, 22,  0, 154, 19,  0, 133, 16,  0, 114, 13,  0, 105, 12,  0, 110, 12,  0, 125, 13,  0,
+   144, 15,  0, 158, 16,  0, 166, 16,  0, 170, 16,  0, 170, 16,  0, 170, 16,  0, 169, 15,  0,
+   168, 16,  2, 166, 18,  5, 165, 23, 11, 163, 32, 21, 162, 43, 33, 160, 52, 43, 159, 55, 47};
diff --git a/src/colormaps_rainbow.h b/src/colormaps_rainbow.h
new file mode 100644
index 0000000..aa566a4
--- /dev/null
+++ b/src/colormaps_rainbow.h
@@ -0,0 +1,44 @@
+static int cmap_rainbow[] = {  38,  0, 50,  38,  0, 51,  38,  0, 51,
+  38,  0, 51,  39,  0, 52,  39,  0, 52,  39,  0, 53,  40,  0, 54,  41,  0, 55,
+  41,  0, 57,  42,  0, 58,  43,  0, 60,  44,  0, 61,  45,  0, 63,  46,  0, 65,
+  47,  0, 67,  48,  0, 70,  50,  0, 72,  51,  0, 75,  52,  0, 77,  53,  0, 80,
+  54,  0, 83,  56,  0, 86,  57,  0, 89,  58,  0, 92,  59,  0, 96,  60,  0, 99,
+  61,  0,103,  62,  0,106,  63,  0,110,  64,  0,114,  65,  0,117,  65,  0,121,
+  66,  0,125,  66,  0,129,  66,  0,133,  66,  0,137,  66,  0,141,  66,  0,145,
+  65,  0,150,  65,  0,154,  64,  0,158,  63,  0,162,  62,  0,166,  60,  0,170,
+  59,  0,174,  57,  0,179,  55,  0,183,  52,  0,187,  50,  0,191,  47,  0,195,
+  44,  0,198,  41,  0,202,  38,  0,206,  34,  0,210,  30,  0,213,  26,  0,217,
+  21,  0,220,  17,  0,223,  12,  0,226,   7,  0,229,   2,  0,232,   0,  3,235,
+   0,  8,237,   0, 14,240,   0, 20,242,   0, 26,244,   0, 33,246,   0, 39,247,
+   0, 46,249,   0, 52,250,   0, 59,251,   0, 66,252,   0, 73,253,   0, 80,253,
+   0, 86,253,   0, 93,253,   0,100,253,   0,107,253,   0,114,253,   0,121,253,
+   0,128,253,   0,136,252,   0,143,252,   0,150,252,   0,157,252,   0,165,252,
+   0,172,252,   0,180,252,   0,187,252,   0,194,251,   0,202,251,   0,210,251,
+   0,217,251,   0,225,250,   0,232,250,   0,240,250,   0,247,250,   0,249,244,
+   0,249,235,   0,248,227,   0,248,219,   0,247,210,   0,247,202,   0,246,193,
+   0,245,185,   0,245,176,   0,244,167,   0,243,159,   0,241,150,   0,240,141,
+   0,238,132,   0,237,123,   0,235,114,   0,232,105,   0,229, 96,   0,226, 87,
+   0,222, 78,   0,217, 69,   0,212, 61,   0,206, 52,   0,198, 43,   0,190, 35,
+   0,181, 27,   0,172, 20,   0,163, 13,   0,157,  7,   0,153,  2,   2,153,  0,
+   7,157,  0,  13,163,  0,  20,172,  0,  27,181,  0,  35,190,  0,  43,198,  0,
+  52,206,  0,  61,212,  0,  69,217,  0,  78,222,  0,  87,226,  0,  96,229,  0,
+ 105,232,  0, 114,235,  0, 123,237,  0, 132,238,  0, 141,240,  0, 150,241,  0,
+ 159,243,  0, 167,244,  0, 176,245,  0, 185,245,  0, 193,246,  0, 202,247,  0,
+ 210,247,  0, 219,248,  0, 227,248,  0, 235,249,  0, 244,249,  0, 250,247,  0,
+ 250,240,  0, 250,232,  0, 250,225,  0, 251,217,  0, 251,210,  0, 251,202,  0,
+ 251,194,  0, 252,187,  0, 252,180,  0, 252,172,  0, 252,165,  0, 252,157,  0,
+ 252,150,  0, 252,143,  0, 252,136,  0, 253,128,  0, 253,121,  0, 253,114,  0,
+ 253,107,  0, 253,100,  0, 253, 93,  0, 253, 86,  0, 253, 80,  0, 253, 73,  0,
+ 252, 66,  0, 251, 59,  0, 250, 52,  0, 249, 46,  0, 247, 39,  0, 246, 33,  0,
+ 244, 26,  0, 242, 20,  0, 240, 14,  0, 237,  8,  0, 235,  3,  0, 232,  0,  2,
+ 229,  0,  7, 226,  0, 12, 223,  0, 17, 220,  0, 21, 217,  0, 26, 213,  0, 30,
+ 210,  0, 34, 206,  0, 38, 202,  0, 41, 198,  0, 44, 195,  0, 47, 191,  0, 50,
+ 187,  0, 52, 183,  0, 55, 179,  0, 57, 174,  0, 59, 170,  0, 60, 166,  0, 62,
+ 162,  0, 63, 158,  0, 64, 154,  0, 65, 150,  0, 65, 145,  0, 66, 141,  0, 66,
+ 137,  0, 66, 133,  0, 66, 129,  0, 66, 125,  0, 66, 121,  0, 65, 117,  0, 65,
+ 114,  0, 64, 110,  0, 63, 106,  0, 62, 103,  0, 61,  99,  0, 60,  96,  0, 59,
+  92,  0, 58,  89,  0, 57,  86,  0, 56,  83,  0, 54,  80,  0, 53,  77,  0, 52,
+  75,  0, 51,  72,  0, 50,  70,  0, 48,  67,  0, 47,  65,  0, 46,  63,  0, 45,
+  61,  0, 44,  60,  0, 43,  58,  0, 42,  57,  0, 41,  55,  0, 41,  54,  0, 40,
+  53,  0, 39,  52,  0, 39,  52,  0, 39,  51,  0, 38,  51,  0, 38,  51,  0, 38,
+                                                                 50,  0, 38 };
diff --git a/src/colormaps_roullet.h b/src/colormaps_roullet.h
new file mode 100644
index 0000000..7b6d230
--- /dev/null
+++ b/src/colormaps_roullet.h
@@ -0,0 +1,40 @@
+/* A color map designed by Guillaume Roullet: a blue-to-red pattern with warming up
+   in the middle, white instead of green, and with interleaved darkened and whitened
+   stripes. Optimized for displaying detail in quasi-contour fashion. */
+static int cmap_roullet[] = {  91, 96,152,  63, 70,156,  21, 32,159,   4, 16,162,
+     0, 13,164,   0, 13,160,   0, 11,134,   0,  5, 66,   0,  2, 23,   0,  7, 77,   0, 14,147,
+     0, 17,177,   0, 20,185,   5, 25,188,  28, 46,190,  82, 95,193, 117,126,195,  76, 91,197,
+    25, 46,199,   4, 30,201,   0, 27,202,   0, 27,197,   0, 23,167,   0, 14, 97,   0,  8, 58,
+     0, 17,115,   0, 29,183,   0, 34,209,   1, 37,216,   7, 44,218,  35, 68,220,  99,121,221,
+   132,150,222,  82,110,224,  25, 66,225,   4, 50,226,   0, 49,226,   0, 48,220,   0, 42,186,
+     0, 26,115,   0, 19, 80,   0, 35,141,   0, 52,206,   0, 60,230,   1, 64,235,   8, 72,237,
+    42, 98,237, 111,148,238, 141,171,239,  84,133,240,  25, 95,241,   4, 83,241,   0, 83,240,
+     0, 82,232,   0, 71,196,   0, 46,123,   0, 36, 94,   0, 62,158,   0, 89,220,   0,101,241,
+     2,107,246,  11,115,247,  48,139,247, 120,180,248, 146,195,248,  83,165,249,  25,139,249,
+     6,133,249,   3,134,248,   3,133,239,   3,114,200,   2, 74,125,   2, 62,102,   4,105,169,
+     6,146,228,   8,163,248,  11,170,251,  22,178,252,  62,195,252, 133,219,252, 152,226,253,
+    91,213,253,  40,205,253,  25,206,253,  25,209,251,  26,205,241,  23,173,199,  16,111,124,
+    15, 98,107,  28,165,177,  41,222,233,  48,243,250,  55,251,253,  68,254,252, 106,254,249,
+   164,254,249, 177,254,248, 131,254,241, 100,254,233,  95,254,228,  99,252,224, 101,240,211,
+    88,195,170,  57,121,104,  56,111, 95,  97,182,155, 133,235,200, 150,251,213, 160,254,216,
+   172,254,218, 194,254,226, 220,254,238, 226,254,239, 212,254,231, 207,254,227, 210,254,227,
+   214,252,228, 209,239,219, 171,191,177, 107,117,110, 106,114,108, 177,187,179, 229,237,230,
+   245,252,246, 250,254,251, 253,254,253, 254,254,254, 254,254,254, 254,254,254, 254,254,254,
+   253,254,253, 251,254,250, 246,252,245, 230,237,229, 179,187,177, 108,114,106, 110,117,107,
+   177,191,171, 219,239,209, 228,252,214, 227,254,210, 227,254,207, 231,254,212, 239,254,226,
+   238,254,220, 226,254,194, 218,254,172, 216,254,160, 213,251,150, 200,235,133, 155,182, 97,
+    95,111, 56, 104,121, 57, 170,195, 88, 211,240,101, 224,252, 99, 228,254, 95, 233,254,100,
+   241,254,131, 248,254,177, 249,254,164, 249,254,106, 252,254, 68, 253,251, 55, 250,243, 48,
+   233,222, 41, 177,165, 28, 107, 98, 15, 124,111, 16, 199,173, 23, 241,205, 26, 251,209, 25,
+   253,206, 25, 253,205, 40, 253,213, 91, 253,226,152, 252,219,133, 252,195, 62, 252,178, 22,
+   251,170, 11, 248,163,  8, 228,146,  6, 169,105,  4, 102, 62,  2, 125, 74,  2, 200,114,  3,
+   239,133,  3, 248,134,  3, 249,133,  6, 249,139, 25, 249,165, 83, 248,195,146, 248,180,120,
+   247,139, 48, 247,115, 11, 246,107,  2, 241,101,  0, 220, 89,  0, 158, 62,  0,  94, 36,  0,
+   123, 46,  0, 196, 71,  0, 232, 82,  0, 240, 83,  0, 241, 83,  4, 241, 95, 25, 240,133, 84,
+   239,171,141, 238,148,111, 237, 98, 42, 237, 72,  8, 235, 64,  1, 230, 60,  0, 206, 52,  0,
+   141, 35,  0,  80, 19,  0, 115, 26,  0, 186, 42,  0, 220, 48,  0, 226, 49,  0, 226, 50,  4,
+   225, 66, 25, 224,110, 82, 222,150,132, 221,121, 99, 220, 68, 35, 218, 44,  7, 216, 37,  1,
+   209, 34,  0, 183, 29,  0, 115, 17,  0,  58,  8,  0,  97, 14,  0, 167, 23,  0, 197, 27,  0,
+   202, 27,  0, 201, 30,  4, 199, 46, 25, 197, 91, 76, 195,126,117, 193, 95, 82, 190, 46, 28,
+   188, 25,  5, 185, 20,  0, 177, 17,  0, 147, 14,  0,  77,  7,  0,  23,  2,  0,  66,  5,  0,
+   134, 11,  0, 160, 13,  0, 164, 13,  0, 162, 16,  4, 159, 32, 21, 156, 70, 63, 152, 96, 91};
diff --git a/src/colormaps_wheel.h b/src/colormaps_wheel.h
new file mode 100644
index 0000000..ec739ce
--- /dev/null
+++ b/src/colormaps_wheel.h
@@ -0,0 +1,40 @@
+/* Periodic over 360-degree hues color palette.  Maximum saturation and brightness.
+    Useful for angles of orientation, tidal phase, and similar data. */
+
+static int cmap_wheel[] = { 255,  0,255, 249,  0,255, 242,  0,255, 237,  0,255,
+   230,  0,255, 224,  0,255, 219,  0,255, 212,  0,255, 206,  0,255, 201,  0,255, 195,  0,255,
+   188,  0,255, 183,  0,255, 177,  0,255, 170,  0,255, 165,  0,255, 159,  0,255, 153,  0,255,
+   147,  0,255, 140,  0,255, 135,  0,255, 128,  0,255, 122,  0,255, 117,  0,255, 110,  0,255,
+   104,  0,255,  99,  0,255,  93,  0,255,  86,  0,255,  81,  0,255,  75,  0,255,  68,  0,255,
+    63,  0,255,  57,  0,255,  51,  0,255,  45,  0,255,  38,  0,255,  33,  0,255,  26,  0,255,
+    20,  0,255,  15,  0,255,   8,  0,255,   2,  0,255,   0,  2,255,   0,  8,255,   0, 15,255,
+     0, 20,255,   0, 26,255,   0, 33,255,   0, 38,255,   0, 44,255,   0, 51,255,   0, 56,255,
+     0, 62,255,   0, 68,255,   0, 75,255,   0, 80,255,   0, 86,255,   0, 93,255,   0, 98,255,
+     0,104,255,   0,110,255,   0,116,255,   0,122,255,   0,128,255,   0,135,255,   0,141,255,
+     0,147,255,   0,153,255,   0,159,255,   0,165,255,   0,170,255,   0,177,255,   0,183,255,
+     0,189,255,   0,195,255,   0,201,255,   0,207,255,   0,212,255,   0,219,255,   0,225,255,
+     0,230,255,   0,237,255,   0,243,255,   0,249,255,   0,255,255,   0,255,248,   0,255,242,
+     0,255,237,   0,255,230,   0,255,224,   0,255,219,   0,255,212,   0,255,206,   0,255,201,
+     0,255,195,   0,255,188,   0,255,183,   0,255,177,   0,255,170,   0,255,165,   0,255,158,
+     0,255,153,   0,255,146,   0,255,140,   0,255,135,   0,255,128,   0,255,122,   0,255,117,
+     0,255,110,   0,255,104,   0,255, 99,   0,255, 93,   0,255, 86,   0,255, 81,   0,255, 75,
+     0,255, 68,   0,255, 63,   0,255, 56,   0,255, 51,   0,255, 45,   0,255, 38,   0,255, 33,
+     0,255, 26,   0,255, 20,   0,255, 15,   0,255,  8,   0,255,  2,   3,255,  0,   9,255,  0,
+    15,255,  0,  21,255,  0,  27,255,  0,  33,255,  0,  39,255,  0,  45,255,  0,  51,255,  0,
+    57,255,  0,  63,255,  0,  69,255,  0,  75,255,  0,  81,255,  0,  87,255,  0,  93,255,  0,
+    99,255,  0, 105,255,  0, 111,255,  0, 117,255,  0, 123,255,  0, 129,255,  0, 135,255,  0,
+   141,255,  0, 147,255,  0, 153,255,  0, 159,255,  0, 165,255,  0, 171,255,  0, 177,255,  0,
+   183,255,  0, 189,255,  0, 195,255,  0, 201,255,  0, 207,255,  0, 212,255,  0, 219,255,  0,
+   225,255,  0, 231,255,  0, 237,255,  0, 243,255,  0, 249,255,  0, 255,254,  0, 255,248,  0,
+   255,242,  0, 255,236,  0, 255,230,  0, 255,224,  0, 255,218,  0, 255,212,  0, 255,206,  0,
+   255,200,  0, 255,194,  0, 255,188,  0, 255,182,  0, 255,176,  0, 255,170,  0, 255,164,  0,
+   255,158,  0, 255,152,  0, 255,146,  0, 255,140,  0, 255,134,  0, 255,128,  0, 255,122,  0,
+   255,116,  0, 255,110,  0, 255,104,  0, 255, 98,  0, 255, 92,  0, 255, 86,  0, 255, 80,  0,
+   255, 74,  0, 255, 68,  0, 255, 62,  0, 255, 56,  0, 255, 50,  0, 255, 44,  0, 255, 38,  0,
+   255, 32,  0, 255, 26,  0, 255, 20,  0, 255, 14,  0, 255,  8,  0, 255,  2,  0, 255,  0,  2,
+   255,  0,  9, 255,  0, 15, 255,  0, 20, 255,  0, 26, 255,  0, 33, 255,  0, 38, 255,  0, 45,
+   255,  0, 51, 255,  0, 56, 255,  0, 63, 255,  0, 68, 255,  0, 75, 255,  0, 81, 255,  0, 86,
+   255,  0, 92, 255,  0, 99, 255,  0,104, 255,  0,111, 255,  0,117, 255,  0,122, 255,  0,128,
+   255,  0,135, 255,  0,140, 255,  0,147, 255,  0,153, 255,  0,158, 255,  0,165, 255,  0,170,
+   255,  0,177, 255,  0,183, 255,  0,188, 255,  0,194, 255,  0,201, 255,  0,206, 255,  0,213,
+   255,  0,219, 255,  0,224, 255,  0,230, 255,  0,237, 255,  0,242, 255,  0,249, 255,  0,255};
diff --git a/src/dataedit.o b/src/dataedit.o
deleted file mode 100644
index 61495cd..0000000
Binary files a/src/dataedit.o and /dev/null differ
diff --git a/src/display_info.o b/src/display_info.o
deleted file mode 100644
index 105ba08..0000000
Binary files a/src/display_info.o and /dev/null differ
diff --git a/src/do_buttons.c b/src/do_buttons.c
index 7d505b1..ab7cdf6 100644
--- a/src/do_buttons.c
+++ b/src/do_buttons.c
@@ -93,12 +93,12 @@ do_rewind( int modifier )
 
 	if( modifier == MOD_2 ) {
 		change_view( -10, PERCENT );
-		in_timer_set( do_rewind, (XtPointer)(MOD_2), delay_millisec );
+		in_timer_set( (XtTimerCallbackProc)do_rewind, (XtPointer)(MOD_2), delay_millisec );
 		}
 	else
 		{
 		change_view( -1, FRAMES );
-		in_timer_set( do_rewind, (XtPointer)(MOD_1), delay_millisec );
+		in_timer_set( (XtTimerCallbackProc)do_rewind, (XtPointer)(MOD_1), delay_millisec );
 		}
 }
 
@@ -158,12 +158,12 @@ do_fastforward( int modifier )
 
 	if( modifier == MOD_2 ) {
 		if( change_view( 10, PERCENT ) == 0 )
-			in_timer_set( do_fastforward, (XtPointer)(MOD_2), delay_millisec );
+			in_timer_set( (XtTimerCallbackProc)do_fastforward, (XtPointer)(MOD_2), delay_millisec );
 		}
 	else
 		{
 		if( change_view( 1, FRAMES ) == 0 )
-			in_timer_set( do_fastforward, (XtPointer)(MOD_1), delay_millisec );
+			in_timer_set( (XtTimerCallbackProc)do_fastforward, (XtPointer)(MOD_1), delay_millisec );
 		}
 }
 		
diff --git a/src/do_buttons.o b/src/do_buttons.o
deleted file mode 100644
index dbc2dab..0000000
Binary files a/src/do_buttons.o and /dev/null differ
diff --git a/src/do_print.o b/src/do_print.o
deleted file mode 100644
index 1aedc57..0000000
Binary files a/src/do_print.o and /dev/null differ
diff --git a/src/epic_time.o b/src/epic_time.o
deleted file mode 100644
index 5b5d513..0000000
Binary files a/src/epic_time.o and /dev/null differ
diff --git a/src/file.c b/src/file.c
index 21c837f..26cf60f 100644
--- a/src/file.c
+++ b/src/file.c
@@ -35,6 +35,10 @@
 #include "ncview.defines.h"
 #include "ncview.protos.h"
 
+#ifdef HAVE_UDUNITS2
+#include "utCalendar2_cal.h"
+#endif
+
 static int   file_type;
 extern NCVar *variables;
 extern Options options;
@@ -418,50 +422,28 @@ void fi_dim_value_convert( double *dimval, FDBlist *file, NCVar *var, NCDim *d )
 #ifdef HAVE_UDUNITS2
 	double converted_dimval;
 	int	year0, month0, hour0, min0, day0, err;
-	int	year1, month1, hour1, min1, day1;
-	double	sec0, sec1, converted_return_value;
+	double	sec0;
 
 	if( (file->recdim_units 	   == NULL) ||
 	    (var->first_file->recdim_units == NULL) ||
-	    (var->first_file->udunits 	   == NULL) ||
-	    (file->udunits 		   == NULL) ||
+	    (var->first_file->ut_unit_ptr  == NULL) ||
+	    (file->ut_unit_ptr 		   == NULL) ||
 	    (! d->timelike )                        ||
 	    (strcmp(file->recdim_units,var->first_file->recdim_units) == 0) ) 
 	    	return;
-/*	    
-printf( "different units encountered: converting recdim value of %lf from %s to %s\n",
-	*dimval, file->recdim_units, var->first_file->recdim_units );
-*/
 
 	/* Convert the dim value to a date using the units given 
 	 * in the file that this dim value came from
 	 */
-	err = utCalendar2_cal( *dimval, file->udunits, 
+	err = utCalendar2_cal( *dimval, file->ut_unit_ptr, 
 		&year0, &month0, &day0, &hour0, &min0, &sec0, d->calendar );
 	if( err == 0 ) {
 		err = utInvCalendar2_cal( year0, month0, day0, hour0, min0, sec0, 
-			var->first_file->udunits, &converted_dimval,
+			var->first_file->ut_unit_ptr, &converted_dimval,
 			d->calendar );
-		if( err == 0 ) {
-
-/*
-printf( "utInvCalendar successed \n" );
-printf( "Successuflly converted date %d/%02d/%02d %02d:%02d from %lf %s to %lf %s (calendar=%s)\n",
-	year0, month0, day0, hour0, min0, *dimval, file->recdim_units,
-	converted_dimval, var->first_file->recdim_units, d->calendar );
-*/
-
+		if( err == 0 ) 
 			*dimval = converted_dimval;
-
-/*
-err = utCalendar2_cal( *dimval, var->first_file->udunits, 
-&year1, &month1, &day1, &hour1, &min1, &sec1, d->calendar );
-printf( "Check date of new value: %lf = %d/%02d/%02d %02d:%02d %s (calendar=%s)\n",
-	*dimval, year1, month1, day1, hour1, min1, 
-	var->first_file->recdim_units, d->calendar );
-*/
-				}
-			}
+		}
 #endif
 }
 
@@ -479,8 +461,8 @@ fi_dim_value( NCVar *var, int dim_id, size_t virt_place, double *return_val_doub
 {
 	size_t	actual_place, *virt_start_pos, *act_start_pos;
 	FDBlist	*file;
-	int	i, err;
-	char	*dim_name, *dim_units;
+	int	i;
+	char	*dim_name;
 	nc_type	ret_val;
 	NCDim	*d;
 	size_t	idx_map;
@@ -588,6 +570,9 @@ fi_has_dim_values( int fileid, char *dim_name )
 	void
 determine_file_type( Stringlist *input_files )
 {
+	int		ierr;
+	struct stat 	buf;
+
 	if( input_files == NULL ) {
 		fprintf( stderr, "ncview: takes at least one file name as argument\n" );
 		useage();
@@ -598,9 +583,19 @@ determine_file_type( Stringlist *input_files )
 		file_type = FILE_TYPE_NETCDF;
 	else
 		{
-		fprintf( stderr, "ncview: can't recognize format of input file %s\n",
-			input_files->string );
-		exit( -1 );
+		ierr = stat( input_files->string, &buf );
+		if( ierr == 0 ) {
+			fprintf( stderr, "ncview: can't recognize format of input file %s\n",
+				input_files->string );
+			exit( -1 );
+			}
+		else
+			{
+			fprintf( stderr, "ncview: can't open file %s",
+				input_files->string );
+			perror(" ");
+			exit( -1 );
+			}
 		}
 }
 
diff --git a/src/file.o b/src/file.o
deleted file mode 100644
index 71fb5b4..0000000
Binary files a/src/file.o and /dev/null differ
diff --git a/src/file_netcdf.c b/src/file_netcdf.c
index d8d2050..bf0b8d2 100644
--- a/src/file_netcdf.c
+++ b/src/file_netcdf.c
@@ -136,12 +136,12 @@ Stringlist *netcdf_fi_list_vars( int fileid )
 					eff_ndims++;
 				}
 			dimlist  = fi_scannable_dims( fileid, var_name );
-			if( (total_size > 1L) && (n_strings_in_list( dimlist ) >= 1))
+			if( (total_size > 1L) && (stringlist_len( dimlist ) >= 1))
 				/* Hack to make version 1.70+ emulate older versions
 				 * that did not display 1-d vars.
 				 */
 				if( ! (options.no_1d_vars && (eff_ndims == 1) ))
-					add_to_stringlist( &ret_val, var_name, NULL );
+					stringlist_add_string( &ret_val, var_name, NULL, SLTYPE_NULL );
 			}
 		}
 	
@@ -190,7 +190,7 @@ Stringlist *netcdf_scannable_dims( int fileid, char *var_name )
 		 * in layer models -- typically just 1 to 2 in that case.
 		 */
 		if( (i == 0) || (dim_size > 1) )
-			add_to_stringlist( &dimlist, dim_name, NULL );
+			stringlist_add_string( &dimlist, dim_name, NULL, SLTYPE_NULL );
 		}
 
 	return( dimlist );
@@ -484,6 +484,7 @@ int netcdf_n_dims( int cdfid, char *varname )
 		fprintf( stderr, "netcdf_n_dims: error calling nc_inq_var for cdfid=%d, ", 
 					cdfid);
 		fprintf( stderr, "varname=%s\n", varname );
+		fprintf( stderr, "Reason: %s\n", nc_strerror( err ));
 		exit( -1 );
 		}
 
@@ -622,6 +623,9 @@ char * netcdf_title( int fileid )
  * Otherwise, returns a pointer to storage allocated in this routine;
  * the calling routine must deallocate the storage when it is done
  * with the attribute.
+ * As a special case, if the attribute exited, but the length of the
+ * attribute was zero, then it returns a pointer to a char string 
+ * that is a single NULL.
  */
 char *netcdf_get_char_att( int fileid, char *var_name, char *att_name )
 {
@@ -645,6 +649,12 @@ char *netcdf_get_char_att( int fileid, char *var_name, char *att_name )
 		return( NULL );
 
 	ret_val = (char *)malloc( name_length+1 );
+
+	if( name_length == 0 ) {
+		ret_val[0] = '\0';
+		return( ret_val );
+		}
+
 	err = nc_get_att_text( fileid, varid, att_name, ret_val );
 	if( err != NC_NOERR )
 		return( NULL );
@@ -782,17 +792,23 @@ nc_type netcdf_dim_value( int fileid, char *dim_name, size_t place,
 	size_t	limit;
 	long	i;
 	size_t	char_place[2], bstart[2], bcount[2];
-	int	n_dims, n_atts, dim[MAX_VAR_DIMS], dimvar_bounds_id;
+	int	n_dims, n_atts, dim[MAX_VAR_DIMS], dimvar_bounds_id, debug;
 	double	boundvals[50], boundvals_min, boundvals_max;
 
+	debug = 0;
+
+	if( debug ) printf( "netcdf_dim_value: entering with dim=%s place=%ld\n", dim_name, place );
+
 	if( ! netcdf_has_dim_values( fileid, dim_name ) ) {
 		*ret_val_double = (double)virt_place;
+		*return_has_bounds = 0;
 		return( NC_DOUBLE );
 		}
 
 	dimvar_id = netcdf_dimvar_id( fileid, dim_name );
 	if( dimvar_id < 0 ) {
 		*ret_val_double = (double)virt_place;
+		*return_has_bounds = 0;
 		return( NC_DOUBLE );
 		}
 
@@ -918,7 +934,7 @@ nc_type netcdf_dim_value( int fileid, char *dim_name, size_t place,
 void netcdf_fill_aux_data( int id, char *var_name, FDBlist *fdb )
 {
 	int	err, varid, n_dims, dim[MAX_NC_DIMS], n_atts, unlimdimvar_id, recdim_id;
-	char	dummy_var_name[ MAX_NC_NAME ], unlimdim_name[MAX_NC_NAME], *unlimdimvar_units;
+	char	dummy_var_name[ MAX_NC_NAME ], unlimdim_name[MAX_NC_NAME];
 	nc_type	type;
 	NetCDFOptions *netcdf;
 
@@ -1059,6 +1075,7 @@ int netcdf_get_att_util( int id, int varid, char *var_name, char *att_name, int
 					free(char_att);
 					break;
 
+				case NC_BYTE:
 				case NC_SHORT:
 					short_att = (short *)malloc( len*sizeof(short) );
 					err = nc_get_att_short( id, varid, att_name, short_att );
@@ -1102,7 +1119,7 @@ int netcdf_get_att_util( int id, int varid, char *var_name, char *att_name, int
 
 		else if( len != expected_len ) {
 			fprintf( stderr, "error in specification of \"%s\" attribute for\n", att_name);
-			fprintf( stderr, "variable %s: %d values specified (should be %d)\n",
+			fprintf( stderr, "variable %s: %ld values specified (should be %d)\n",
 				var_name, len, expected_len );
 			return( FALSE );
 			}
@@ -1391,6 +1408,7 @@ char *netcdf_att_string( int fileid, char *var_name )
 			fprintf( stderr, "netcdf_att_string: failed on nc_inq_att call!\n" );
 			exit(-1);
 			}
+		size_to_use = -1;
 		switch( datatype ) {
 			case NC_BYTE:   size_to_use = sizeof(char);   break;
 			case NC_CHAR:   size_to_use = sizeof(char);   break;
@@ -1399,6 +1417,9 @@ char *netcdf_att_string( int fileid, char *var_name )
 			case NC_FLOAT:  size_to_use = sizeof(float);  break;
 			case NC_DOUBLE: size_to_use = sizeof(double); break;
 			case NC_NAT:    fprintf( stderr, "Error, can't handle attribute of type NC_NAT, ignoring\n" ); size_to_use = sizeof(double); break;
+			default:
+				fprintf( stderr, "Error, unhandled netcdf data type: %d\n", datatype );
+				exit(-1);
 			}
 	
 		data = (char *)malloc(size_to_use*len);
@@ -1413,7 +1434,7 @@ char *netcdf_att_string( int fileid, char *var_name )
 				case NC_BYTE:   sprintf( line, "%d ",  *((char   *)data+i) ); break;
 				case NC_CHAR:   sprintf( line, "%c",   *((char   *)data+i) ); break;
 				case NC_SHORT:  sprintf( line, "%d ",  *((short  *)data+i) ); break;
-				case NC_LONG:   sprintf( line, "%ld ", *((nclong *)data+i) ); break;
+				case NC_LONG:   sprintf( line, "%ld ", (long)(*((nclong *)data+i)) ); break;
 				case NC_FLOAT:  sprintf( line, "%f ",  *((float  *)data+i) ); break;
 				case NC_DOUBLE: sprintf( line, "%lf ", *((double *)data+i) ); break;
 				case NC_NAT:    sprintf( line, "(NC_NAT) ");                  break;
@@ -1454,6 +1475,7 @@ char *netcdf_global_att_string( int fileid )
 
 		ncattname( fileid, NC_GLOBAL, iatt, att_name );
 		ncattinq(  fileid, NC_GLOBAL, att_name, &datatype, &len );
+		size_to_use = -1;
 		switch( datatype ) {
 			case NC_BYTE:   size_to_use = sizeof(char);   break;
 			case NC_CHAR:   size_to_use = sizeof(char);   break;
@@ -1462,6 +1484,9 @@ char *netcdf_global_att_string( int fileid )
 			case NC_FLOAT:  size_to_use = sizeof(float);  break;
 			case NC_DOUBLE: size_to_use = sizeof(double); break;
 			case NC_NAT:    fprintf(stderr,"Error, cannot handle attributes of type NC_NAT; ignoring\n" ); break;
+			default:
+				fprintf( stderr, "Error, unhandled netcdf data type: %d\n", datatype );
+				exit(-1);
 			}
 	
 		data = (char *)malloc(size_to_use*len);
@@ -1476,7 +1501,7 @@ char *netcdf_global_att_string( int fileid )
 				case NC_BYTE:   sprintf( line, "%d ",  *((char   *)data+i) ); break;
 				case NC_CHAR:   sprintf( line, "%c",   *((char   *)data+i) ); break;
 				case NC_SHORT:  sprintf( line, "%d ",  *((short  *)data+i) ); break;
-				case NC_LONG:   sprintf( line, "%ld ", *((nclong *)data+i) ); break;
+				case NC_LONG:   sprintf( line, "%ld ", (long)(*((nclong *)data+i)) ); break;
 				case NC_FLOAT:  sprintf( line, "%f ",  *((float  *)data+i) ); break;
 				case NC_DOUBLE: sprintf( line, "%lf ", *((double *)data+i) ); break;
 				case NC_NAT:    sprintf( line, "(NC_NAT) "); break;
@@ -1513,19 +1538,25 @@ void warn_about_char_dims()
  */
 int netcdf_dimvar_bounds_id( int fileid, char *dim_name, int *nvertices )
 {
-	int	reg_dimvar_id, bounds_dimvar_id, dimvar_ndims, err, name_length;
+	int	reg_dimvar_id, bounds_dimvar_id, dimvar_ndims, err, name_length, debug;
 	char	*attname = "bounds";
 	char 	*bounds_dimvarname;
 	nc_type	type;
 	size_t	st_nvertices;
 	int dimids[MAX_NC_DIMS]; 
 
+	debug = 0;
+
+	if( debug ) printf( "netcdf_dimvar_bounds_id: checking if dim %s have a bounds_var\n", dim_name );
+
 	/* First get the regular dimvar for this dim, then see if that dimvar
 	 * has an attribute named "bounds".
 	 */
 	reg_dimvar_id = netcdf_dimvar_id( fileid, dim_name );
-	if( reg_dimvar_id < 0 )
+	if( reg_dimvar_id < 0 ) {
+		if( debug ) printf( "netcdf_dimvar_bounds_id: dim %s does NOT have a regular dimvar, returning -1\n", dim_name );
 		return( -1 );
+		}
 
 	if( netcdf_att_id( fileid, reg_dimvar_id, attname ) < 0 )
 		return( -1 );
diff --git a/src/file_netcdf.o b/src/file_netcdf.o
deleted file mode 100644
index 8c77a5b..0000000
Binary files a/src/file_netcdf.o and /dev/null differ
diff --git a/src/filesel.o b/src/filesel.o
deleted file mode 100644
index 375d1d7..0000000
Binary files a/src/filesel.o and /dev/null differ
diff --git a/src/geteuid b/src/geteuid
deleted file mode 100755
index f8c33fa..0000000
Binary files a/src/geteuid and /dev/null differ
diff --git a/src/geteuid.o b/src/geteuid.o
deleted file mode 100644
index 35d0931..0000000
Binary files a/src/geteuid.o and /dev/null differ
diff --git a/src/handle_rc_file.c b/src/handle_rc_file.c
new file mode 100644
index 0000000..f81728a
--- /dev/null
+++ b/src/handle_rc_file.c
@@ -0,0 +1,165 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+
+#include "stringlist.h"
+
+#define NCVIEW_STATE_FILE_VERSION	1
+
+/* 
+These routines handle the initilization (rc)/state file for ncview.
+
+Note that ncview can already use an x windows type apps file. However,
+the syntax of that is so convoluted and arcane that it's too difficult
+to use in general. For ncview options (as opposed to X widows options),
+I've introduced this new file just for ncview that stores its state
+between invocations. By default it's $(HOME)/.ncviewrc
+
+I've implemented the state file using Stringlists.  You can write
+out a Stringlist to a file and read one in from a file, so I coerce
+the state into a Stringlist and then use that functionalilty.
+
+David W Pierce
+Scripps Insititution of Oceanography
+15 July 2011
+*/
+
+/*================================================================================
+ * Write the state to a disk file. Returns 0 on success, != 0 on error.
+ */
+	int
+write_state_to_file( Stringlist *state_to_save )
+{
+	char 	*homedir;
+	char	tmp_fname[2000], final_fname[2000];
+	Stringlist	*header = NULL;
+	int	err, ival, outfid;
+	FILE	*outf;
+
+	/* Make our ncview header */
+	ival = NCVIEW_STATE_FILE_VERSION;
+	if( (err = stringlist_add_string( &header, "NCVIEW_STATE_FILE_VERSION", &ival, SLTYPE_INT )) != 0 ) {
+		fprintf( stderr, "Error making header for ncview save state file\n" );
+		return( -1 );
+		}
+
+	/* Alg: create a temporary file with the new state, then
+	 * mv that to the actual state file.
+	 */
+
+	/* Get what temporary directory to use. NOTE: I do NOT write it to /tmp,
+	 * because that could be on a different file system than the user's
+	 * home directory, and posix call rename() is not guaranteed to work
+	 * across file systems.  This is a reasonable solution anyway ... since
+	 * we eventually will put the .rc file into the user's home dir, might
+	 * as well find out right away if we can't write to it.
+	 */
+	homedir = getenv( "HOME" );
+	if( homedir == NULL ) {
+		fprintf( stderr, "Error, there is no $HOME environmental variable defined. That is where ncview puts the initialization file ... define that env var if you want ncview to save information between invocations.\n" );
+		return( -78 );
+		}
+
+	/* Make template for temporary filename */
+	if( strlen(homedir) > 1900 ) {
+		fprintf( stderr, "Error, temporary directory name is too long: %s\n", homedir );
+		return( -1 );
+		}
+	sprintf( final_fname, "%s/.ncviewrc",        homedir );
+	sprintf( tmp_fname,   "%s/.ncviewrc.XXXXXX", homedir );
+
+	/* Make temporary file safely */
+	outfid = mkstemp( tmp_fname );
+	if( outfid == -1 ) {
+		fprintf( stderr, "Error trying to open temporary file \"%s\" for writing!\n", tmp_fname );
+		fprintf( stderr, "Ncview uses this to write out a state file, so that it can remember user-selected options between being run.\n" );
+		fprintf( stderr, "If you would like to have this functionality, then fix the permissions so that ncview can write to that directory\n" );
+		return( -1 );
+		}
+
+	/* Open it as a file stream */
+	if( (outf = fopen( tmp_fname, "a" )) == NULL ) {
+		fprintf( stderr, "Error opening temporary file \"%s\" for output!\n", tmp_fname );
+		return( -1 );
+		}
+
+	close( outfid );	/* close file descriptor only */
+
+	/* Add the header to the head of the stringlist to save */
+	if( (err = stringlist_cat( &header, &state_to_save )) != 0 ) {
+		fprintf( stderr, "Error trying to add header to state file to save\n" );
+		return( err );
+		}
+
+	/* Write the state save information to the file */
+	err = stringlist_write_to_file( header, outf );
+	if( err != 0 ) {
+		fprintf( stderr, "Error writing header for state information to temporary file \"%s\"\n", tmp_fname );
+		return( -1 );
+		}
+
+	fclose( outf );
+
+	/* Free storage associated with our header */
+	stringlist_delete_entire_list( header );
+
+	/* Now copy our temporary file over to its final name */
+	if( rename( tmp_fname, final_fname ) != 0 ) {
+		fprintf( stderr, "Error trying to copy the temporary version of the ncview options file (%s) over to the final file (%s). If you want ncview to remember options between runs, then fix permissions for this directory\n",
+			tmp_fname, final_fname );
+		return( -79 );
+		}
+
+	return(0);
+}
+
+/*================================================================================
+ * Read the state from a disk file. Returns 0 on success, != 0 on error.
+ */
+	int
+read_state_from_file( Stringlist **state )
+{
+	int		err;
+	char 	*homedir;
+	char	final_fname[2000];
+	FILE	*fin;
+
+	/* Handle obvious errors */
+	if( state == NULL ) {
+		fprintf( stderr, "read_state_from_file: passed a NULL pointer\n" );
+		exit(-1);
+		}
+	if( *state != NULL ) {
+		fprintf( stderr, "read_state_from_file: is supposed to be passed a NULL list to start with!\n" );
+		exit(-1);
+		}
+
+	/* Get name of our state file */
+	homedir = getenv( "HOME" );
+	if( homedir == NULL ) {
+		fprintf( stderr, "Error, there is no $HOME environmental variable defined. That is where ncview puts the initialization file ... define that env var if you want ncview to save information between invocations.\n" );
+		return( -80 );
+		}
+
+	if( strlen(homedir) > 1900 ) {
+		fprintf( stderr, "Error, environmental variable $HOME is too long (has too many characters)\n" );
+		return( -81 );
+		}
+	sprintf( final_fname, "%s/.ncviewrc", homedir );
+
+	/* Open the file for reading */
+	if( (fin = fopen(final_fname, "r")) == NULL ) {
+		fprintf( stderr, "Note: could not open file %s for reading\n", final_fname );
+		return( -83 );
+		}
+
+	if( (err = stringlist_read_from_file( state, fin )) != 0 ) {
+		fprintf( stderr, "Error reading in ncview's state from file %s\n", final_fname );
+		return( -82 );
+		}
+
+	fclose( fin );
+	return(0);
+}
+
diff --git a/src/interface.o b/src/interface.o
deleted file mode 100644
index f657e8f..0000000
Binary files a/src/interface.o and /dev/null differ
diff --git a/src/interface/RadioWidget.c b/src/interface/RadioWidget.c
index e00f972..1613809 100644
--- a/src/interface/RadioWidget.c
+++ b/src/interface/RadioWidget.c
@@ -35,17 +35,20 @@ David W. Pierce
 #include "RadioWidget.h"
 
 static void  	button_click_callback(Widget w, XtPointer client_data, XtPointer call_data );
-static void  	set_button_on_inner ( RadioWidget rw, int butnum );
-static void  	set_button_off_inner( RadioWidget rw, int butnum );
+static void  	set_button_on_inner ( RadioWidget rw, long butnum );
+static void  	set_button_off_inner( RadioWidget rw, long butnum );
+
+/*
 static void 	RadioWidget_dump( RadioWidget rw );
+*/
 
 /**************************************************************************************************************/
 RadioWidget RadioWidget_init( Widget parent, Widget widget_fromvert, 
-		int nbut, int first_on, char **labels, 
+		long nbut, long first_on, char **labels, 
 		Pixmap *pixmap_off, Pixmap *pixmap_on,
 		XtCallbackProc set_callback, XtCallbackProc unset_callback )
 {
-	int 		i;
+	long 		i;
 	Widget 		hbox_widget, label_widget;
 	RadioWidget 	retval;
 
@@ -58,7 +61,7 @@ RadioWidget RadioWidget_init( Widget parent, Widget widget_fromvert,
 	retval->nbut = nbut;
 
 	if( (first_on < 0) || first_on >= nbut ) {
-		fprintf( stderr, "Error, RadioWidget_init called with bad value for first_on: %d\n", first_on );
+		fprintf( stderr, "Error, RadioWidget_init called with bad value for first_on: %ld\n", first_on );
 		exit(-1);
 		}
 
@@ -68,7 +71,7 @@ RadioWidget RadioWidget_init( Widget parent, Widget widget_fromvert,
 		}
 	for( i=0; i<nbut; i++ ) {
 		if( labels[i] == NULL ) {
-			fprintf( stderr, "Error, RadioWidget_init called with labels[%d] == NULL!\n", i );
+			fprintf( stderr, "Error, RadioWidget_init called with labels[%ld] == NULL!\n", i );
 			exit(-1);
 			}
 		}
@@ -132,13 +135,13 @@ RadioWidget RadioWidget_init( Widget parent, Widget widget_fromvert,
 }
 
 /**************************************************************************************************************/
-void set_button_off_inner( RadioWidget rw, int butnum )
+void set_button_off_inner( RadioWidget rw, long butnum )
 {
 	XtVaSetValues( rw->button_widget[butnum], XtNbitmap, *(rw->pixmap_off), NULL );
 }
 
 /**************************************************************************************************************/
-void set_button_on_inner( RadioWidget rw, int butnum )
+void set_button_on_inner( RadioWidget rw, long butnum )
 {
 	XtVaSetValues( rw->button_widget[butnum], XtNbitmap, *(rw->pixmap_on), NULL );
 }
@@ -146,7 +149,7 @@ void set_button_on_inner( RadioWidget rw, int butnum )
 /**************************************************************************************************************/
 void button_click_callback( Widget w, XtPointer client_data, XtPointer call_data )
 {
-	int 		i, butno;
+	long 		i, butno;
 	RadioWidget 	rw;
 
 	rw = (RadioWidget)client_data;
@@ -179,15 +182,17 @@ void button_click_callback( Widget w, XtPointer client_data, XtPointer call_data
 }
 
 /**************************************************************************************************/
-void RadioWidget_dump( RadioWidget rw )
+/*
+static void RadioWidget_dump( RadioWidget rw )
 {
 	printf( "-------------\n" );
-	printf( "This radio widget has %d buttons\n", rw->nbut );
-	printf( "Curerntly set: %d\n", rw->current_set );
+	printf( "This radio widget has %ld buttons\n", rw->nbut );
+	printf( "Curerntly set: %ld\n", rw->current_set );
 }
+*/
 
 /**************************************************************************************************/
-int RadioWidget_query_current( RadioWidget rw )
+long RadioWidget_query_current( RadioWidget rw )
 {
 	return( rw->current_set );
 }
@@ -195,7 +200,7 @@ int RadioWidget_query_current( RadioWidget rw )
 /**************************************************************************************************/
 /* Note this doesn't call the callbacks.  Should it?
  */
-void RadioWidget_set_current( RadioWidget rw, int butno )
+void RadioWidget_set_current( RadioWidget rw, long butno )
 {
 	/* When we set a button on, we must first clear the currently set button */
 	set_button_off_inner( rw, rw->current_set );
diff --git a/src/interface/RadioWidget.h b/src/interface/RadioWidget.h
index 710fe4d..ab9d09f 100644
--- a/src/interface/RadioWidget.h
+++ b/src/interface/RadioWidget.h
@@ -33,16 +33,16 @@ Widget, use RadioWidget->widget
 typedef struct {
 
 	Widget		widget;		/* My top level box widget */
-	int		nbut;
+	long		nbut;
 	Widget		*button_widget;
 	XtCallbackProc	set_callback, unset_callback;
 	Pixmap		*pixmap_on, *pixmap_off;
-	int		current_set;
+	long		current_set;
 
 } RadioWidgetStruct, *RadioWidget;
 
-RadioWidget RadioWidget_init( Widget parent, Widget fromvert, int nbut, int first_on, char **labels, Pixmap *pixmap_off, Pixmap *pixmap_on, XtCallbackProc set_callback, XtCallbackProc unset_callback );
+RadioWidget RadioWidget_init( Widget parent, Widget fromvert, long nbut, long first_on, char **labels, Pixmap *pixmap_off, Pixmap *pixmap_on, XtCallbackProc set_callback, XtCallbackProc unset_callback );
 
-int 	RadioWidget_query_current( RadioWidget rw );
-void 	RadioWidget_set_current  ( RadioWidget rw, int butno );
+long 	RadioWidget_query_current( RadioWidget rw );
+void 	RadioWidget_set_current  ( RadioWidget rw, long butno );
 
diff --git a/src/interface/cbar.c b/src/interface/cbar.c
index 73d5724..bca9ce5 100644
--- a/src/interface/cbar.c
+++ b/src/interface/cbar.c
@@ -21,10 +21,11 @@
  * pierce at cirrus.ucsd.edu
  */
 
+/* define USE_DISK_FONTS */
+
 #include "../ncview.includes.h"
 #include "../ncview.defines.h"
 #include "../ncview.protos.h"
-#include "../ncview.bitmaps.h"
 
 extern  Options   options;
 
@@ -68,12 +69,6 @@ static my_Font   *cbar_font;
  * Prototypes for routines local to this file
  */
 static struct chr_struct *set_chr( int index, my_Font *font );
-static void process_font_file( FILE *f, my_Font *font );
-static void get_a_char( FILE *f, char *firstline, my_Font *font, struct chr_struct *chr );
-static void set_line( char *line, int chr_width, unsigned char *place );
-static void turn_to_bits( char c, unsigned char *b4, unsigned char *b3, unsigned char *b2, unsigned char *b1 );
-static void get_properties(FILE *f, my_Font *font);
-static my_Font *open_font( char *font_name );
 static void do_special( my_Raster *rast, char *s );
 static void set_pixel( my_Raster *rast, int x, int y, rlpix color );
 static void put_char( my_Raster *rast, char c );
@@ -88,6 +83,15 @@ static void mynormalize( double value, double *mantissa, double *exponent );
 static int string_width( char *s, my_Font *font );
 static my_Font *font_from_include();
 
+#ifdef USE_DISK_FONTS
+static void get_properties(FILE *f, my_Font *font);
+static void turn_to_bits( char c, unsigned char *b4, unsigned char *b3, unsigned char *b2, unsigned char *b1 );
+static void set_line( char *line, int chr_width, unsigned char *place );
+static my_Font *open_font( char *font_name );
+static void process_font_file( FILE *f, my_Font *font );
+static void get_a_char( FILE *f, char *firstline, my_Font *font, struct chr_struct *chr );
+#endif
+
 /*******************************************************************************************/
 void cbar_init()
 {
@@ -150,7 +154,7 @@ void cbar_make( int width, int height, int n_extra_colors, float user_min, float
 			normval = 1. - normval;
 
 		*(cbar_raster->pixels + i + j*width) = (unsigned char)(normval*(double)options.n_colors + n_extra_colors);
-		if( options.debug && (j==0)) fprintf( stderr, "cbar_make: value for i=%d is %d\n", i, *(cbar_raster->pixels + i + j*width));
+		/* if( options.debug && (j==0)) fprintf( stderr, "cbar_make: value for i=%d is %d\n", i, *(cbar_raster->pixels + i + j*width)); */
 		}
 
 	/* Bail if the data is too weird to make labels for */
@@ -210,7 +214,7 @@ int cbar_info( unsigned char **data, int *width, int *height )
 		return(-1);
 		}
 
-	*data   = (char *)cbar_raster->pixels;
+	*data   = (unsigned char *)cbar_raster->pixels;
 	*width  = cbar_raster->width;
 	*height = cbar_raster->height;
 
@@ -252,6 +256,15 @@ static struct chr_struct *set_chr( int index, my_Font *font )
 	return( set_chr( 32, font) );
 }
 
+/*******************************************************************************************
+ * All this following code is for when you want to read a font from disk.
+ * However, in ncview itself, I don't do this because you don't know if the
+ * disk font will be available. Instead, I use defined arrays. But it's 
+ * here for future use or debugging.
+ */
+#ifdef USE_DISK_FONTS
+/*******************************************************************************************/
+
 /*******************************************************************************************/
 static void process_font_file( FILE *f, my_Font *font )
 {
@@ -521,6 +534,10 @@ static my_Font *open_font( char *font_name )
 
 	return( ret_val );
 }
+/*******************************************************************************************/
+/* This is the endif for USE_DISK_FONTS */
+/*******************************************************************************************/
+#endif
 
 /************************************************************************************/
 /* Can take special characters \sup{} and \sub{} */
diff --git a/src/interface/colormap_funcs.c b/src/interface/colormap_funcs.c
new file mode 100644
index 0000000..f399475
--- /dev/null
+++ b/src/interface/colormap_funcs.c
@@ -0,0 +1,760 @@
+/*
+ * Ncview by David W. Pierce.  A visual netCDF file viewer.
+ * Copyright (C) 1993-2010 David W. Pierce
+ *
+ * This program  is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License, version 3, for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * David W. Pierce
+ * 6259 Caminito Carrena
+ * San Diego, CA  92122
+ * pierce at cirrus.ucsd.edu
+ */
+
+#include "../ncview.includes.h"
+#include "../ncview.defines.h"
+#include "../ncview.protos.h"
+
+#define CMAPLIST_MAGIC		378218
+#define CMAPLIST_BAD_MAGIC	129802
+
+/********************************************/
+extern Stringlist	*read_in_state;
+extern Widget 		topLevel;
+extern Server_Info	server;
+extern Cmaplist		*colormap_list, *current_colormap_list;		/* These are MY structures */
+extern Colormap		current_colormap;				/* This is the standard X windows struct */
+extern Options		options;
+extern ncv_pixel 	*pixel_transform;
+/********************************************/
+
+void dump_Cmaplist	( Cmaplist *cml );
+
+static Cmaplist *dup_single_cmaplist( Cmaplist *el );
+static void new_cmaplist( Cmaplist **cml );
+static Cmaplist *x_find_colormap_from_name( char *name );
+static int check_cmaplist_magic( Cmaplist *cml );
+
+/***************************************************************************************************/
+/* Given a Cmaplist, this returns a duplicate of it.  This is a little confusing since 
+ * a list of these things (Cmaplist stucts) is just a bunch of individual Cmaplist structs.
+ * In any event, routine "dup_whole_cmaplist" duplicates an entire list, while routine
+ * "dup_single_cmaplist" duplicates a single Cmaplist struct, not the entire chain of
+ * Cmaplist structs.
+ */
+Cmaplist *dup_whole_cmaplist( Cmaplist *src_list )
+{
+	Cmaplist	*cml, *newel, *prevel=NULL, *list_head=NULL;
+
+	if( src_list == NULL )
+		return( NULL );
+
+	cml = src_list;
+	while( cml != NULL ) {
+		
+		if( check_cmaplist_magic( cml ) != 0 ) {
+			fprintf( stderr, "Error, trying to duplicate a cmaplist with an invalid element\n" );
+			exit(-1);
+			}
+
+		newel = dup_single_cmaplist( cml );	/* has NULL for ->next and ->prev elements */
+		if( prevel == NULL ) 
+			list_head = newel;
+		else
+			{
+			prevel->next = newel;
+			newel->prev  = prevel;
+			}
+		prevel = newel;
+		cml = cml->next;
+		}
+
+	return( list_head );
+}
+
+/***************************************************************************************************/
+/* Dumplicates a SINGLE cmaplist element, not an entire chain of them.  Leaves NULL in the
+ * ->next and ->prev elements.
+ */
+static Cmaplist *dup_single_cmaplist( Cmaplist *el )
+{
+	Cmaplist	*newel;
+	int		i;
+
+	/* This allocates space for pixel_transform and color_list */
+	new_cmaplist( &newel );
+
+	newel->name = (char *)malloc( sizeof(char)*(strlen(el->name)+1));
+	strcpy( newel->name, el->name );
+
+	newel->enabled = el->enabled;
+
+	for( i=0; i<(options.n_colors+options.n_extra_colors); i++ ) {
+		newel->pixel_transform[i] = el->pixel_transform[i];
+		newel->color_list     [i] = el->color_list[i];
+		}
+
+	return( newel );
+}
+
+/***************************************************************************************************
+ * Return a pointer to the colormap list entry that has this name, or NULL if this name is 
+ * not that of a colormap on the list
+ */
+static Cmaplist *x_find_colormap_from_name( char *name )
+{
+	Cmaplist	*cml;
+
+        cml = colormap_list;
+        while( cml != NULL ) {
+
+		if( check_cmaplist_magic( cml ) != 0 ) {
+			fprintf( stderr, "Error, trying to find a colormap from name in a cmaplist with an invalid element\n" );
+			exit(-1);
+			}
+
+                if( strcmp(cml->name, name) == 0 )
+                        return(cml);
+                cml = cml->next;
+                }
+
+        return(NULL);
+}
+
+/***************************************************************************************************/
+/* Return 1 if we alrady have a colormap with the name of the passed argument in the specified
+ * list of colormaps, and 0 otherwise
+ */
+int x_seen_colormap_name( char *name )
+{
+	if( x_find_colormap_from_name(name) == NULL ) 
+		return(0);
+	else
+		return(1);
+}
+
+/***************************************************************************************************
+ * Given an index into the colormap list, this sets
+ * "name" to point to storage for the colormap's name,
+ * sets "enabled" to 1 if the colormap is enabled and to
+ * 0 otherwise, and sets "color_list" to point to an
+ * array of N XColors.
+ */
+void x_colormap_info( Cmaplist *cmlist, int idx, char **name, int *enabled, XColor **color_list )
+{
+        Cmaplist        *cml;
+        int             i;
+
+        if( idx < 0 ) {
+                fprintf( stderr, "Error, bad idx entry in x_colormap_name: %d\n", idx );
+                exit(-1);
+                }
+
+        if( cmlist == NULL ) {
+                fprintf( stderr, "Error, x_colormap_name called but no colormaps are on the list" );
+                exit(-1);
+                }
+
+        cml = cmlist;
+        for( i=0; i<idx; i++ ) {
+
+		if( check_cmaplist_magic( cml ) != 0 ) {
+			fprintf( stderr, "Error, trying to find colormap information in a cmaplist with an invalid element\n" );
+			exit(-1);
+			}
+
+                if( cml->next == NULL ) {
+                        fprintf( stderr, "Error, x_colormap_name called with idx=%d but n_colormaps=%d\n",
+                                idx, x_n_colormaps( cmlist ) );
+                        exit(-1);
+                        }
+                cml = cml->next;
+                }
+
+        *name           = cml->name;
+        *enabled        = cml->enabled;
+        *color_list     = cml->color_list;
+}
+
+/***************************************************************************************************/
+int x_n_colormaps( Cmaplist *cmlist )
+{
+        Cmaplist        *cml;
+        int             n;
+
+        if( cmlist == NULL )
+                return( 0 );
+
+        n = 1;
+        cml = cmlist;
+        while( cml->next != NULL ) {
+
+		if( check_cmaplist_magic( cml ) != 0 ) {
+			fprintf( stderr, "Error, trying to compute colormap length in a cmaplist with an invalid element\n" );
+			exit(-1);
+			}
+
+                cml = cml->next;
+                n++;
+                }
+
+        return(n);
+}
+
+/***************************************************************************************************/
+void x_check_legal_colormap_loaded()
+{
+	Cmaplist	*cm, **list_to_use, *tcm;
+	int		n_enabled, n_cm_saved, n_cm_prog, n_cm_max, i, i_cursor, n_list_to_use=0, *cmap_used_already;
+	Stringlist	*sl;
+	char		cm_name[1000];
+
+	/* We have the following tasks:
+	 * 	1) Make the order of the in-program colormaps be the same
+	 *	   as the order in the save file.
+	 *	2) Make the enabled-ness of the colormaps in the program
+	 *	   be the same as the save file.
+	 *	3) Make sure current_colormap_list is set to a valid colormap 
+	 * Any colormaps that are in the program but not in the save file
+	 * are enabled and included at the end of the colormap list.
+	 */
+	n_cm_saved = stringlist_len( read_in_state );
+	n_cm_prog  = x_n_colormaps( colormap_list );
+	n_cm_max   = n_cm_saved + n_cm_prog;		/* max possible colormaps we could have */
+	if( n_cm_max > 200 ) {
+		fprintf( stderr, "Error, too many colormaps -- max is 200\n" );
+		exit(-1);
+		}
+	if( n_cm_max < 1 ) {
+		fprintf( stderr, "Internal error -- n_cm_max == 0?!?\n" );
+		exit(-1);
+		}
+
+	list_to_use = (Cmaplist **)malloc( sizeof( Cmaplist * ) * n_cm_max );
+	if( list_to_use == NULL ) {
+		fprintf( stderr, "Error allocating a temporary colormap list pointer\n" );
+		exit(-1);
+		}
+	for( i=0; i<n_cm_max; i++ )
+		list_to_use[i] = NULL;		/* initialize to "not set" */
+
+	cmap_used_already = (int *)malloc( sizeof(int) * n_cm_saved );
+	if( cmap_used_already == NULL ) {
+		fprintf( stderr, "Error allocating a temporary colormap array\n" );
+		exit(-1);
+		}
+	for( i=0; i<n_cm_saved; i++ )
+		cmap_used_already[i] = 0;
+
+	/* Start with the colormaps in the save file, put those
+	 * on the list first
+	 */
+	sl = read_in_state;
+	i_cursor = 0;
+	while( sl != NULL ) {
+		/* Get name of colormap that we read in from the save file.
+		 * Remember that they are prepended with "CMAP_"
+		 */
+		if( strncmp( sl->string, "CMAP_", 5 ) == 0 ) {
+			if( strlen( sl->string ) > 900 ) {
+				fprintf( stderr, "Error, saved colormap name too long (remove $HOME/.ncviewrc file if stuck)\n" );
+				exit(-1);
+				}
+			/* This is a saved colormap, extract its name */
+			strcpy( cm_name, sl->string+5 );
+
+			/* Look for this colormap on the program's colormap list */
+			tcm = x_find_colormap_from_name( cm_name );
+
+			/* If we found this colormap, save it to our list */
+			if( tcm == NULL ) 
+				printf( "Note: Program does not know about saved colormap \"%s\" -- ignoring it\n", cm_name );
+			else
+				{
+				if( cmap_used_already[i_cursor] == 0 ) {
+					list_to_use[ n_list_to_use++ ] = tcm;
+					cmap_used_already[i_cursor] = 1;
+					}
+				}
+			}
+		sl = sl->next;
+		i_cursor++;
+		}
+
+	/* Now add on any colormaps that the program knows about but
+	 * which were not in the save file
+	 */
+	cm = colormap_list;
+	while( cm != NULL ) {
+		if( strlen(cm->name) > 900 ) {
+			fprintf( stderr, "Error, colormap name is too long: %s\n", cm->name );
+			exit(-1);
+			}
+		sprintf( cm_name, "CMAP_%s", cm->name );
+		sl = stringlist_match_string_exact( read_in_state, cm_name );
+		if( sl == NULL ) 
+			list_to_use[ n_list_to_use++ ] = cm;
+
+		cm = cm->next;
+		}
+
+	if( n_list_to_use == 0 ) {
+		fprintf( stderr, "Strange internal error, no colormaps known?!?\n" );
+		exit(-1);
+		}
+
+	/* Make sure at least one colormap is enabled. If not,
+	 * set the first one to be enabled
+	 */
+	n_enabled = 0;
+	for( i=0; i<n_list_to_use; i++ )
+		n_enabled += list_to_use[i]->enabled;
+	if( n_enabled == 0 )
+		list_to_use[0]->enabled = 1;
+
+	/* Set our current colormap to the first enabled one */
+	for( i=0; i<n_list_to_use; i++ )
+		if( list_to_use[i]->enabled ) {
+			current_colormap_list = list_to_use[i];
+			break;
+			}
+
+	/* Set up our next and prev pointers */
+	for( i=0; i<n_list_to_use; i++ ) {
+		if( i == 0 ) 
+			list_to_use[i]->prev = NULL;
+		else
+			list_to_use[i]->prev = list_to_use[i-1];
+		if( i == (n_list_to_use-1))
+			list_to_use[i]->next = NULL;
+		else
+			list_to_use[i]->next = list_to_use[i+1];
+		}
+
+	/* Set to head of our list */
+	colormap_list = list_to_use[0];
+
+	/* check to make sure all is kosher */
+	cm = colormap_list;
+	while( cm != NULL ) {
+		if( check_cmaplist_magic( cm ) != 0 ) {
+			fprintf( stderr, "Error, generated a cmaplist with an invalid element\n" );
+			exit(-1);
+			}
+		cm = cm->next;
+		}
+
+	free( list_to_use );
+	free( cmap_used_already );
+}
+
+/***************************************************************************************************/
+void x_create_colormap( char *name, unsigned char r[256], unsigned char g[256], unsigned char b[256] )
+{
+        Colormap        orig_colormap, new_colormap;
+        Display         *display;
+        int             i, status=0, enabled;
+        XColor          *color;
+        unsigned long   plane_masks[1], pixels[1];
+        Cmaplist        *cmaplist, *cml;
+        static int      first_time_through = FALSE;
+	char		sl_cmap_name[1020];
+	Stringlist	*sl;
+
+	/*
+	printf( "----------------------\n" );
+	printf( "in x_create_colormap, here is state stringlist:\n" );
+	stringlist_dump( read_in_state );
+	printf( "----------------------\n" );
+	*/
+
+        display = XtDisplay( topLevel );
+
+        if( colormap_list == NULL )
+                first_time_through = TRUE;
+        else
+                first_time_through = FALSE;
+
+        /* Make a new Cmaplist structure, and link it into the list */
+        new_cmaplist( &cmaplist );
+        cmaplist->name = (char *)malloc( (strlen(name)+1)*sizeof(char) );
+        strcpy( cmaplist->name, name );
+
+	/* Figure out if, according to our saved state, this colormap
+	 * should be enabled or not. If we don't find this colormap 
+	 * in the list, default to 'Enabled' 
+	 */
+	if( strlen(name) > 1000 ) {
+		fprintf( stderr, "Error, colormap name is too long: %s\n", name );
+		exit(-1);
+		}
+	sprintf( sl_cmap_name, "CMAP_%s", name );
+	sl = stringlist_match_string_exact( read_in_state, sl_cmap_name );
+	if( sl == NULL ) {
+		printf( "did not find color map %s in state file: enabling by default\n", sl_cmap_name );
+	 	cmaplist->enabled = 1;
+		}
+	else
+		{
+		if( sl->sltype != SLTYPE_INT ) {
+			fprintf( stderr, "Error, saved TYPE for colormap %s is not an int\n", sl_cmap_name );
+			enabled = 1;
+			}
+		else
+			enabled = *((int *)(sl->aux));
+		cmaplist->enabled = enabled;
+		}
+
+        if( first_time_through )
+                colormap_list = cmaplist;
+        else
+                {
+                cml = colormap_list;
+                while( cml->next != NULL )
+                        cml = cml->next;
+                cml->next      = cmaplist;
+                cmaplist->prev = cml;
+                }
+
+        if( first_time_through ) {
+
+                /* First time through, allocate the read/write entries in the colormap.
+                 * We always do ten more than the number of colors requested so that
+                 * black can indicate 'fill_value' entries, and the other color entries
+                 * (which are the window elements) can be colored as desired.
+                 */
+                current_colormap_list = cmaplist;
+
+                /* TrueColor device */
+                if( options.display_type == TrueColor ) {
+                        for( i=0; i<(options.n_colors+options.n_extra_colors); i++ ) {
+                                (cmaplist->color_list+i)->pixel = (long)i;
+                                *(cmaplist->pixel_transform+i)  = (ncv_pixel)i;
+                                }
+                        }
+
+                /* Shared colormap, PseudoColor device */
+                if( (!options.private_colormap) && (options.display_type == PseudoColor) ) {
+                        /* Try the standard colormap, and see if
+                         * it has enough available colorcells.
+                         */
+                        orig_colormap    = DefaultColormap( display, 0 );
+                        current_colormap = orig_colormap;
+                        i      = 0;
+                        status = 1;
+                        while( (i < (options.n_colors+options.n_extra_colors)) && (status != 0) ) {
+                                status = XAllocColorCells( display, orig_colormap, True,
+                                        plane_masks, 0, pixels, 1 );
+                                (cmaplist->color_list+i)->pixel = *pixels;
+                                *(cmaplist->pixel_transform+i)   = (ncv_pixel)*pixels;
+                                i++;
+                                }
+                        }
+
+                /* standard colormap failed for PseudoColor, allocate a private colormap */
+                if( (options.display_type == PseudoColor) &&
+                                ((status == 0) || (options.private_colormap)) ) {
+                        printf( "Using private colormap...\n" );
+                        new_colormap  = XCreateColormap(
+                                display,
+                                RootWindow( display, DefaultScreen( display ) ),
+                                XDefaultVisualOfScreen( XtScreen( topLevel ) ),
+                                AllocNone );
+                        current_colormap = new_colormap;
+                        for( i=0; i<(options.n_colors+options.n_extra_colors); i++ )
+                                {
+                                status = XAllocColorCells( display, new_colormap,
+                                                True, plane_masks,
+                                                0, pixels, 1 );
+                                if( status == 0 ) {
+                                        fprintf( stderr, "ncview: x_create_colormap: couldn't allocate \n" );
+                                        fprintf( stderr, "requested number of colorcells in a private colormap\n" );
+                                        fprintf( stderr, "Try requesting fewer colors with the -nc option\n" );
+                                        exit( -1 );
+                                        }
+                                (cmaplist->color_list+i)->pixel = *pixels;
+                                *(cmaplist->pixel_transform+i)  = (ncv_pixel)*pixels;
+                                }
+                        }
+                pixel_transform = cmaplist->pixel_transform;
+                }
+        else
+                {
+                /* if NOT the first time through, just set the pixel values */
+                for( i=0; i<options.n_colors+options.n_extra_colors; i++ ) {
+                        (cmaplist->color_list+i)->pixel =
+                                (current_colormap_list->color_list+i)->pixel;
+                        *(cmaplist->pixel_transform+i)   =
+                                (ncv_pixel)(current_colormap_list->color_list+i)->pixel;
+                        }
+                }
+
+        /* Set the first ten colors including black, the color used for "Fill_Value" entries */
+        for( i=0; i<options.n_extra_colors; i++ ) {
+                color        = cmaplist->color_list+i;
+                color->flags = DoRed | DoGreen | DoBlue;
+                color->red   = 256*(unsigned int)255;
+                color->green = 256*(unsigned int)255;
+                color->blue  = 256*(unsigned int)255;
+                }
+        color        = cmaplist->color_list+1;
+        color->flags = DoRed | DoGreen | DoBlue;
+        color->red   = 256*(unsigned int)0;
+        color->green = 256*(unsigned int)0;
+        color->blue  = 256*(unsigned int)0;
+
+        for( i=options.n_extra_colors; i<options.n_colors+options.n_extra_colors; i++ )
+                {
+                color        = cmaplist->color_list+i;
+                color->flags = DoRed | DoGreen | DoBlue;
+                color->red   = (unsigned int)
+                                (256*interp( i-options.n_extra_colors, options.n_colors, r, 256 ));
+                color->green = (unsigned int)
+                                (256*interp( i-options.n_extra_colors, options.n_colors, g, 256 ));
+                color->blue  = (unsigned int)
+                                (256*interp( i-options.n_extra_colors, options.n_colors, b, 256 ));
+                }
+
+        if( (options.display_type == PseudoColor) && first_time_through )
+                XStoreColors( XtDisplay(topLevel), current_colormap, current_colormap_list->color_list,
+                        options.n_colors+options.n_extra_colors );
+}
+
+/****************************************************************************************************
+ * This returns the name of the newly installed colormap.  If do_widgets_flag
+ * is false, don't install colormaps on the widgets, just on the topLevel.
+ */
+char *x_change_colormap( int delta, int do_widgets_flag )
+{
+	int	dump_cmap_list, n_enabled;
+	Cmaplist *cursor;
+
+	dump_cmap_list = 0;	/* for debugging */
+
+	if( dump_cmap_list ) {
+		printf( "---- on entry to x_change_colormap, here is colormap_list\n" );
+		dump_Cmaplist( colormap_list );
+		}
+
+	/* Make sure at least one colormap is enabled. As a failsafe, is none
+	 * are enabled, enable the first one on the list
+	 */
+	cursor = colormap_list;
+	if( check_cmaplist_magic( cursor ) != 0 ) {
+		fprintf( stderr, "Error, trying to change colormaps in a cmaplist with an invalid element\n" );
+		exit(-1);
+		}
+	n_enabled = colormap_list->enabled;
+	while( cursor->next != NULL ) {
+		if( check_cmaplist_magic( cursor ) != 0 ) {
+			fprintf( stderr, "Error, trying to change colormaps in a cmaplist with an invalid element\n" );
+			exit(-1);
+			}
+		cursor = cursor->next;
+		n_enabled = n_enabled + cursor->enabled;
+		}
+	if( n_enabled == 0 ) {
+		printf( "Warning, no colormaps enabled in x_change_colormap -- using first on list\n" );
+		colormap_list->enabled = 1;
+		}
+
+        if( delta > 0 ) {
+		/* Advance to next enabled colormap. Might have to wrap
+		 * around to the start to encounter an enabled one.
+		 */
+	 	if( current_colormap_list->next == NULL )
+			current_colormap_list = colormap_list;	/* go to head of list */
+		else
+			current_colormap_list = current_colormap_list->next;
+		while( current_colormap_list->enabled == 0 ) {
+			if( current_colormap_list->next == NULL )
+				current_colormap_list = colormap_list;
+			else
+				current_colormap_list = current_colormap_list->next;
+			}
+                }
+
+        else if( delta < 0 ) {
+		/* delta < 0, go backwards on the list */
+                if( current_colormap_list->prev == NULL ) {
+			/* Go to last colormap */
+                        while( current_colormap_list->next != NULL )
+                                current_colormap_list = current_colormap_list->next;
+			}
+		else
+			current_colormap_list = current_colormap_list->prev;
+
+		/* Now go to an enabled colormap */
+		while( current_colormap_list->enabled == 0 ) {
+			if( current_colormap_list->prev == NULL ) {
+				/* Go to last colormap */
+				while( current_colormap_list->next != NULL )
+					current_colormap_list = current_colormap_list->next;
+				}
+			else
+				current_colormap_list = current_colormap_list->prev;
+			}
+                }
+	else
+		{
+		;	/* We can be called with delta=0, if we changed to a new colormap in the options selection widget */
+		}
+
+        if( options.display_type == PseudoColor )
+                XStoreColors( XtDisplay(topLevel), current_colormap,
+                        current_colormap_list->color_list,
+                        options.n_colors+1 );
+        pixel_transform = current_colormap_list->pixel_transform;
+
+        return( current_colormap_list->name );
+}
+
+/*************************************************************************************************/
+static void new_cmaplist( Cmaplist **cml )
+{
+	(*cml) = (Cmaplist *)malloc( sizeof( Cmaplist ) );
+	(*cml)->color_list = (XColor *)malloc( (options.n_colors+options.n_extra_colors)*sizeof(XColor) );
+	(*cml)->next       = NULL;
+	(*cml)->prev       = NULL;
+	(*cml)->name       = NULL;
+	(*cml)->enabled    = 1;		/* start out enabled by default */
+	(*cml)->pixel_transform = (ncv_pixel *)malloc( (options.n_colors+options.n_extra_colors)*sizeof(ncv_pixel) );
+	(*cml)->magic      = CMAPLIST_MAGIC;		/* indicate a valid list element */
+}
+
+/*************************************************************************************************
+ * Returns -1 unless the passed thing is a valid Cmaplist * pointing to a valid element
+ */
+	static int
+check_cmaplist_magic( Cmaplist *cml )
+{
+	if( cml == NULL ) {
+		fprintf( stderr, "Error, NULL cmaplist pointer!\n" );
+		return( -1 );
+		}
+
+	if( cml->magic != CMAPLIST_MAGIC ) {
+		if( cml->magic == CMAPLIST_BAD_MAGIC ) {
+			fprintf( stderr, "Error, using a previously deleted Cmaplist (bad magic number found)\n" );
+			return(-1);
+			}
+		else
+			{
+			fprintf( stderr, "Error, trying to use an invalid or malformed Cmaplist (missing valid magic number) \n" );
+			return(-1);
+			}
+		}
+
+	return(0);
+}
+
+/*************************************************************************************************/
+void delete_cmaplist( Cmaplist *cml )
+{
+	Cmaplist	*cursor, *tt;
+
+	if( cml == NULL )
+		return;
+
+	if( check_cmaplist_magic( cml ) != 0 ) {
+		fprintf( stderr, "delete_cmaplist: coding error, trying to delete an invalid Cmaplist\n" );
+		exit(-1);
+		}
+
+	/* Go to head of list */
+	cursor = cml;
+	while( cml->prev != NULL )
+		cursor = cursor->prev;
+
+	/* Delete all subsequent elements ... */
+	while( cursor != NULL ) {
+		if( check_cmaplist_magic( cursor ) != 0 ) {
+			fprintf( stderr, "delete_cmaplist: coding error, trying to delete an invalid Cmaplist\n" );
+			exit(-1);
+			}
+		if( cursor->color_list != NULL )
+			free( cursor->color_list );
+		if( cursor->pixel_transform != NULL )
+			free( cursor->pixel_transform );
+
+		cursor->magic = CMAPLIST_BAD_MAGIC;
+
+		tt = cursor->next;
+		free( cursor );
+		cursor = tt;
+		}
+}
+
+/********************************************************************************************************/
+void dump_Cmaplist( Cmaplist *cml ) 
+{
+	Cmaplist	*cursor, *next, *prev;
+
+	cursor = cml;
+	printf( "========================== Cmaplist: ===========\n" );
+	while( cursor != NULL ) {
+		printf( "ADDR=%ld MAGIC=%d PREV=%ld NEXT=%ld name:%s enabled:%d ", 
+			(long)cursor, cursor->magic, (long)cursor->prev, (long)cursor->next,
+			cursor->name, cursor->enabled );
+
+		prev = (Cmaplist *)(cursor->prev);
+		if( prev == NULL )
+			printf( "name_PREV:NULL ");
+		else
+			printf( "name_PREV:%s ", prev->name );
+
+		next = (Cmaplist *)(cursor->next);
+		if( next == NULL )
+			printf( "name_NEXT:NULL ");
+		else
+			printf( "name_NEXT:%s ", next->name );
+		printf("\n" );
+
+		cursor = next;
+		}
+}
+
+/********************************************************************************************************
+ * Put the information about what colormaps we want enabled, and their order, into a stringlist 
+ * Returns 0 on success, != 0 on error
+ */
+	int
+colormap_options_to_stringlist( Stringlist **sl ) 
+{
+	Cmaplist	*cursor;
+	int		err, enabled;
+	char		cmap_name_ext[1024];	/* "extended" because it has a "CMAP_" prepended */
+
+	cursor = colormap_list;
+	while( cursor != NULL ) {
+		if( check_cmaplist_magic( cursor ) != 0 ) {
+			fprintf( stderr, "Error, trying to find information about a cmaplist with an invalid element\n" );
+			exit(-1);
+			}
+		if( strlen( cursor->name ) > 1000 ) {
+			fprintf( stderr, "Error, colormap name too long -- max is 1000 chars (routine colormap_options_to_stringlist)\n" );
+			exit(-1);
+			}
+		sprintf( cmap_name_ext, "CMAP_%s", cursor->name );
+		enabled = cursor->enabled;
+		if( (err = stringlist_add_string( sl, cmap_name_ext, &enabled, SLTYPE_INT )) != 0 ) {
+			fprintf( stderr, "colormap_options_to_stringlist: Error creating save state stringlist\n" );
+			return( err );
+			}
+
+		cursor = cursor->next;
+		}
+
+	return( 0 );
+}
+
diff --git a/src/interface/filesel.c b/src/interface/filesel.c
index bb2f1dd..98626f9 100644
--- a/src/interface/filesel.c
+++ b/src/interface/filesel.c
@@ -257,7 +257,10 @@ fs_double_click(Widget w, XButtonEvent *e, String *p, Cardinal *n )
         void
 fs_popup_callback( Widget widget, XtPointer client_data, XtPointer call_data)
 {
-	fs_popup_result = (int)client_data;
+	long	l_client_data;
+
+	l_client_data   = (long)client_data;
+	fs_popup_result = (int)l_client_data;
 	fs_popup_done   = TRUE;
 }
 
@@ -322,8 +325,8 @@ fs_get_file_dir_list( Stringlist **files_and_dirs )
 
 	fs_list_dir( &files, &dirs );
 
-	sl_cat( files_and_dirs, &dirs  );
-	sl_cat( files_and_dirs, &files );
+	stringlist_cat( files_and_dirs, &dirs  );
+	stringlist_cat( files_and_dirs, &files );
 }
 
 /*********************************************************************
@@ -345,16 +348,16 @@ fs_list_dir( Stringlist **files, Stringlist **dirs )
 			if( fs_is_a_directory( dir_entry->d_name )) {
 				tchar = (char *)malloc( sizeof(char) * (strlen(dir_entry->d_name) + 5));        /* add space for NULL and trailing slash */
 				sprintf( tchar, "%s/", dir_entry->d_name );
-				add_to_stringlist_ordered( dirs, tchar, NULL );
+				stringlist_add_string_ordered( dirs, tchar, NULL, SLTYPE_NULL );
 				free( tchar );
 				}
 			else 
-				add_to_stringlist_ordered( files, dir_entry->d_name, NULL );
+				stringlist_add_string_ordered( files, dir_entry->d_name, NULL, SLTYPE_NULL );
 			}
 		}
 
-	add_to_stringlist_ordered( dirs, "../", NULL );
-	add_to_stringlist_ordered( dirs, "./", NULL );
+	stringlist_add_string_ordered( dirs, "../", NULL, SLTYPE_NULL );
+	stringlist_add_string_ordered( dirs, "./", NULL, SLTYPE_NULL );
 }
 
 /*********************************************************************/
@@ -388,7 +391,7 @@ stringlist_to_Xawlist( Stringlist *strings )
 	String  *s;
 	Stringlist *sl;
 
-	n  = n_strings_in_list(strings);
+	n  = stringlist_len(strings);
 	s = (String *)malloc( sizeof(String *) * (n+1) );
 	sl = strings;
 	i = 0;
diff --git a/src/interface/interface.c b/src/interface/interface.c
index 8b44aa0..33b23c6 100644
--- a/src/interface/interface.c
+++ b/src/interface/interface.c
@@ -456,6 +456,7 @@ report_position( int x, int y, unsigned int button_mask )
 	view_report_position( x, y, button_mask );
 }
 
+/***************************************************************************/
 /* This is called by regular routines which want to know where the
  * cursor is currently inside the color-contour window.
  */
@@ -465,24 +466,28 @@ in_query_pointer_position( int *x, int *y )
 	x_query_pointer_position( x, y );
 }
 
+/***************************************************************************/
 	void
 in_set_edit_place( size_t index, int x, int y, int nx, int ny )
 {
 	x_set_edit_place( index, x, y, nx, ny );
 }
 
+/***************************************************************************/
 	void
 in_change_dat( size_t index, float new_val )
 {
 	view_change_dat( index, new_val );
 }	
 
+/***************************************************************************/
 	void
 in_data_edit_dump( void )
 {
 	view_data_edit_dump();
 }
 
+/***************************************************************************/
 	int
 in_popup_XY_graph( size_t n, int dimindex, double *xvals, double *yvals, char *x_axis_title,
 	char *y_axis_title, char *title, char *legend, Stringlist *scannable_dims )
@@ -491,24 +496,28 @@ in_popup_XY_graph( size_t n, int dimindex, double *xvals, double *yvals, char *x
 			title, legend, scannable_dims ));
 }
 
+/***************************************************************************/
 	void
 in_display_stuff( char *s, char *var_name )
 {
 	x_display_stuff( s, var_name );
 }
 
+/***************************************************************************/
 	void
 in_popup_2d_window()
 {
 	x_popup_2d_window();
 }
 
+/***************************************************************************/
 	void
 in_popdown_2d_window()
 {
 	x_popdown_2d_window();
 }
 
+/***************************************************************************/
 	int
 in_report_auto_overlay( void )
 {
diff --git a/src/interface/make_tc_data.c b/src/interface/make_tc_data.c
new file mode 100644
index 0000000..da88414
--- /dev/null
+++ b/src/interface/make_tc_data.c
@@ -0,0 +1,181 @@
+/* These routines make truecolor data from simple byte-scaled data, using the supplied
+ * colormap and the information about the server's byte depth, byte ordering, etc.
+ *
+ * Part of Ncview by David W. Pierce
+ * Copyright (C) 1993 through 2011 David W. Pierce
+ * 
+ * This program  is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License, Version 3, as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License, version 3, for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * David W. Pierce
+ * 6259 Caminito Carrena
+ * San Diego, CA  92122
+ */
+
+#include "../ncview.includes.h"
+#include "../ncview.defines.h"
+#include "../ncview.protos.h"
+
+/* These are declared and set in x_interface.c */
+extern Server_Info	server;
+
+/* Following are local to this file only */
+static void make_tc_data_16( unsigned char *data, long width, long height, XColor *color_list,
+		unsigned char *tc_data );
+static void make_tc_data_24( unsigned char *data, long width, long height, XColor *color_list,
+		unsigned char *tc_data );
+static void make_tc_data_32( unsigned char *data, long width, long height, XColor *color_list,
+		unsigned char *tc_data );
+
+/*************************************************************************************************/
+/* Converts the byte-scaled data to truecolor representation,
+ * using the passed array of N XColors (typically N ~ 256).
+ */
+void make_tc_data( unsigned char *data, long width, long height, XColor *color_list,
+	unsigned char *tc_data )
+{
+	switch (server.bytes_per_pixel) {
+		case 4: make_tc_data_32( data, width, height, color_list, tc_data );
+			break;
+
+		case 3:
+			make_tc_data_24( data, width, height, color_list, tc_data );
+			break;
+
+		case 2:
+			make_tc_data_16( data, width, height, color_list, tc_data );
+			break;
+
+		default:
+			fprintf( stderr, "Sorry, I am not set up to produce ");
+			fprintf( stderr, "images of %d bytes per pixel.\n", 
+					server.bytes_per_pixel );
+			exit( -1 );
+			break;
+		}
+}
+
+/*************************************************************************************************/
+static void make_tc_data_16( unsigned char *data, long width, long height, XColor *color_list,
+		unsigned char *tc_data )
+{
+	int	i, j, pix;
+	size_t	pad_offset, po_val;
+
+	/* pad to server.bitmap_pad bits if required */
+	pad_offset = 0L;
+	po_val     = 0L;
+	if( (width%2 != 0) && (server.bits_per_pixel != server.bitmap_pad) ) 
+		po_val = 2L;
+
+	/****************************************
+	 *    Least significant bit first
+	 ****************************************/
+	for( j=0; j<height; j++ ) {
+		for( i=0; i<width; i++ ) {
+
+			pix = *(data+i+j*width);
+
+			*(tc_data+i*2+j*(width*2)+pad_offset) = 
+				(unsigned char)((color_list+pix)->blue>>server.shift_blue & server.mask_blue);
+
+			*(tc_data+i*2+1+j*(width*2)+pad_offset) = 
+				(unsigned char)((color_list+pix)->green>>server.shift_green_upper & server.mask_green_upper);
+
+
+			*(tc_data+i*2+j*(width*2)+pad_offset) +=
+				(unsigned char)((color_list+pix)->green>>server.shift_green_lower & server.mask_green_lower );
+
+			*(tc_data+i*2+1+j*(width*2)+pad_offset) +=
+				(unsigned char)((color_list+pix)->red>>server.shift_red & server.mask_red );
+			}
+		pad_offset += po_val;
+		}
+}
+
+/*************************************************************************************************/
+static void make_tc_data_24( unsigned char *data, long width, long height, XColor *color_list,
+		unsigned char *tc_data )
+{
+	int	i, j, pix, o_r, o_g, o_b;
+	long	pad_offset, po_val;
+
+	if( server.rgb_order == ORDER_RGB ) {
+		o_r = 2;
+		o_g = 1;
+		o_b = 0;
+		}
+	else
+		{
+		o_r = 0;
+		o_g = 1;
+		o_b = 2;
+		}
+
+	/* pad to server.bitmap_pad bits if required */
+	pad_offset = 0L;
+	po_val     = 0L;
+	if( (((width*3)%4) != 0) && (server.bits_per_pixel != server.bitmap_pad) ) 
+		po_val = (server.bitmap_pad/8) - (width*3)%4;
+
+	for( j=0; j<height; j++ ) {
+		for( i=0; i<width; i++ ) {
+
+			pix = *(data+i+j*width);
+			*(tc_data+i*3+o_b+j*(width*3)+pad_offset) = 
+				(char)((color_list+pix)->blue>>8);
+			*(tc_data+i*3+o_g+j*(width*3)+pad_offset) = 
+				(char)((color_list+pix)->green>>8);
+			*(tc_data+i*3+o_r+j*(width*3)+pad_offset) = 
+				(char)((color_list+pix)->red>>8);
+			}
+		pad_offset += po_val;
+		}
+}
+
+/*************************************************************************************************/
+static void make_tc_data_32( unsigned char *data, long width, long height, XColor *color_list,
+		unsigned char *tc_data )
+{
+	int	i, j, pix, o_r, o_g, o_b;
+
+	if( server.rgb_order == ORDER_RGB ) {
+		o_r = 2;
+		o_g = 1;
+		o_b = 0;
+		}
+	else
+		{
+		o_r = 0;
+		o_g = 1;
+		o_b = 2;
+		}
+	if( server.byte_order == MSBFirst ) {
+		o_r++;
+		o_g++;
+		o_b++;
+		}
+
+	for( i=0; i<width; i++ )
+	for( j=0; j<height; j++ ) {
+		pix = *(data+i+j*width);
+		*(tc_data+i*4+o_b+j*(width*4)) = 
+			(char)((color_list+pix)->blue>>8);
+		*(tc_data+i*4+o_g+j*(width*4)) = 
+			(char)((color_list+pix)->green>>8);
+		*(tc_data+i*4+o_r+j*(width*4)) = 
+			(char)((color_list+pix)->red>>8);
+		}
+}
+	
+
diff --git a/src/interface/plot_range.c b/src/interface/plot_range.c
index 2121a80..ddce8ef 100644
--- a/src/interface/plot_range.c
+++ b/src/interface/plot_range.c
@@ -212,7 +212,10 @@ x_plot_range_init()
         void
 plot_range_popup_callback( Widget widget, XtPointer client_data, XtPointer call_data)
 {
-	plot_range_popup_result = (int)client_data;
+	long	l_client_data;
+
+	l_client_data = (long)client_data;
+	plot_range_popup_result = (int)l_client_data;
 	plot_range_popup_done   = TRUE;
 }
 
diff --git a/src/interface/plot_xy.c b/src/interface/plot_xy.c
index 9088de8..2436535 100644
--- a/src/interface/plot_xy.c
+++ b/src/interface/plot_xy.c
@@ -115,6 +115,7 @@ x_popup_XY_graph( long n, int dimindex, double *xvals, double *yvals, char *x_ax
 	char *y_axis_title, char *title, char *legend, Stringlist *scannable_dims )
 {
 	int	i, index, color_id;
+	long	l_index;
 	Stringlist *sl;
 
 	if( options.debug )
@@ -381,11 +382,12 @@ x_popup_XY_graph( long n, int dimindex, double *xvals, double *yvals, char *x_ax
 		XtPopup( plot_XY_popup_widget[index], XtGrabNone );
 
 		/* Add the mouse tracking function */
+		l_index = (long)index;
 		XtAddEventHandler( plot_XY_widget[index],
 			PointerMotionMask | ButtonPressMask,
 			False,
 			xy_track_pointer,
-			(XtPointer)index );
+			(XtPointer)l_index );
 
 		/* Move the popup place so the next one won't cover this one. */
 		last_popup_x += 10;
@@ -584,7 +586,7 @@ id_calling_menu_widget( Widget w, int *index, int *entry )
 	static void 	
 dim_menu_sel_callback(Widget w, XtPointer client_data, XtPointer call_data)
 {
-	int	index, entry;
+	int	index=0, entry;
 	String	label;
 
 	XtVaGetValues( w, XtNlabel, &label, NULL );
@@ -711,8 +713,10 @@ xy_track_pointer( Widget w, XtPointer client_data, XEvent *event, Boolean *conti
 	int	root_x, root_y, win_x, win_y, index;
 	unsigned int keys_and_buttons;
 	float	data_x, data_y;
+	long	l_index;
 
-	index = (int)client_data;
+	l_index = (long)client_data;
+	index = (int)l_index;
 
 	if( XQueryPointer( XtDisplay(topLevel),
 			XtWindow( plot_XY_widget[index] ),
diff --git a/src/interface/printer_options.c b/src/interface/printer_options.c
index 56b9a40..8f11813 100644
--- a/src/interface/printer_options.c
+++ b/src/interface/printer_options.c
@@ -89,7 +89,8 @@ printer_options( PrintOptions *po )
 {
 	int	llx, lly, urx, ury;
 	char	tstr[1024], *tstr2;
-	 Boolean t_or_f;
+	Boolean t_or_f;
+	long	l_output_device;
 
 #ifdef DEBUG
 	fprintf(stderr, "entering printer_options\n" );
@@ -98,7 +99,8 @@ printer_options( PrintOptions *po )
 	/******* Set current values of everything *******/
 
 	/*** Output Device ***/
-	XawToggleSetCurrent( po_outdev_printer_widget, (XtPointer)po->output_device );
+	l_output_device = (long)(po->output_device);
+	XawToggleSetCurrent( po_outdev_printer_widget, (XtPointer)l_output_device );
 	if( po->output_device == DEVICE_PRINTER )
 		XtVaSetValues( po_outf_text_widget, XtNsensitive, FALSE, NULL );
 	XtVaSetValues( po_outf_text_widget, XtNstring, po->out_file_name, NULL );
@@ -179,7 +181,8 @@ printer_options( PrintOptions *po )
 		sscanf( tstr2, "%d", &(po->header_font_size) );
 
 		/*** Device ***/
-		po->output_device = (int)XawToggleGetCurrent(po_outdev_printer_widget); 
+		l_output_device = (long)XawToggleGetCurrent(po_outdev_printer_widget); 
+		po->output_device = (int)l_output_device;
 		XtVaGetValues( po_outf_text_widget, XtNstring, &tstr2, NULL );
 		strcpy( po->out_file_name, tstr2 );
 
@@ -209,9 +212,11 @@ printer_options( PrintOptions *po )
 	return( po_popup_result );
 }
 
+/*===============================================================================================*/
 	void
 printer_options_init()
 {
+
 	po_popup_widget = XtVaCreatePopupShell(
 		"Printer Options",
 		transientShellWidgetClass,
@@ -524,19 +529,24 @@ printer_options_init()
 
 }
 
+/*===============================================================================================*/
         void
 po_popup_callback( Widget widget, XtPointer client_data, XtPointer call_data)
 {
+	long	l_po_popup_result;
+
 #ifdef DEBUG
 	fprintf( stderr, "entering po_popup_callback\n" );
 #endif
-	po_popup_result = (int)client_data;
-	po_popup_done   = TRUE;
+	l_po_popup_result = (long)client_data;
+	po_popup_result   = (int)l_po_popup_result;
+	po_popup_done     = TRUE;
 #ifdef DEBUG
 	fprintf( stderr, "exiting po_popup_callback\n" );
 #endif
 }
 
+/*===============================================================================================*/
         void
 po_outdev_printer_callback( Widget widget, XtPointer client_data, XtPointer call_data)
 {
@@ -550,6 +560,7 @@ po_outdev_printer_callback( Widget widget, XtPointer client_data, XtPointer call
 #endif
 }
 
+/*===============================================================================================*/
         void
 po_outdev_file_callback( Widget widget, XtPointer client_data, XtPointer call_data)
 {
diff --git a/src/interface/range.c b/src/interface/range.c
index e9265e6..2ea744d 100644
--- a/src/interface/range.c
+++ b/src/interface/range.c
@@ -312,7 +312,10 @@ x_range_init()
         void
 range_popup_callback( Widget widget, XtPointer client_data, XtPointer call_data)
 {
-	range_popup_result = (int)client_data;
+	long	l_client_data;
+
+	l_client_data      = (long)client_data;
+	range_popup_result = (int)l_client_data;
 	range_popup_done   = TRUE;
 }
 
diff --git a/src/interface/set_options.c b/src/interface/set_options.c
index 80748ae..89449cd 100644
--- a/src/interface/set_options.c
+++ b/src/interface/set_options.c
@@ -32,12 +32,25 @@
 
 #define OVERLAY_FILENAME_LEN		1024
 
+/* Size of the widget that holds our colormap-selection widgets */
+#define CMAP_VIEWPORT_WIDTH		585
+#define CMAP_VIEWPORT_HEIGHT		300
+
+/* Following is in pixels for the colormap's name */
+#define CMAP_NAME_WIDTH			80		
+
+/* This is the little test colorbar -- how wide and tall should it be? */
+#define CMAP_CBAR_HEIGHT		28
+
+
 static char overlay_filename[ OVERLAY_FILENAME_LEN ];
 
 extern Widget		topLevel;
 extern XtAppContext	x_app_context;
 extern Options		options;
 extern Pixmap 		open_circle_pixmap, closed_circle_pixmap; /* set in x_interface.c */
+extern Server_Info	server;
+extern Cmaplist		*colormap_list, *current_colormap_list;
 
 static Widget
 	opt_popup_widget,
@@ -49,13 +62,33 @@ static Widget
 					opt_overlays_filename_widget,
 			opt_shrink_box_widget,
 				opt_shrink_label_widget,
+			opt_cbsel_viewport_widget,
+				opt_cbsel_form_widget,		/* "cbsel" == "colorbar selection" */
+				opt_cbsel_label_widget,
+				opt_cbsel_cmap_all_or_none_widget,
+					opt_cbsel_enable_all_widget,
+					opt_cbsel_enable_none_widget,
+
+					/* For these arrays, there are N_CLORMAPS entries */
+					*opt_cbsel_cmap_entry_widget,
+						*opt_cbsel_enable_widget,
+						*opt_cbsel_top_widget,
+						*opt_cbsel_up_widget,
+						*opt_cbsel_down_widget,
+						*opt_cbsel_bottom_widget,
+						*opt_cbsel_name_widget,
+						*opt_cbsel_cbar_widget,
 			opt_action_box_widget,
 				opt_ok_widget,
 				opt_cancel_widget;
 
+static XImage **cbar_ximages;
+
 static RadioWidget overlay_widget, shrink_widget;
+static Cmaplist	*setopts_cmaplist = NULL;
 
-static int opt_popup_done = FALSE, opt_popup_result;
+static int opt_popup_done = FALSE;
+static long opt_popup_result;
 
 static XEvent	opt_event;
 
@@ -70,20 +103,53 @@ void shrink_unset_callback 	( Widget widget, XtPointer client_data, XtPointer ca
 /* Order of these must match defines of SHRINK_METHOD_MEAN and SHRINK_METHOD_MODE
  * in file ../ncview.defines.h!
  */
-static char *shrink_labels[] = { "Average (Mean)", "Most common value (Mode)" };
+static char *shrink_labels[] = { "Average (Mean; for continuous data)", "Most common value (Mode; for categorical data)" };
+
+/* Local callbacks */
+void cbsel_enable_callback	( Widget w, XtPointer client_data, XtPointer call_data );
+void cbsel_enable_all_callback	( Widget w, XtPointer client_data, XtPointer call_data );
+void cbsel_enable_none_callback	( Widget w, XtPointer client_data, XtPointer call_data );
+void cbsel_top_callback   	( Widget w, XtPointer client_data, XtPointer call_data );
+void cbsel_up_callback    	( Widget w, XtPointer client_data, XtPointer call_data );
+void cbsel_down_callback  	( Widget w, XtPointer client_data, XtPointer call_data );
+void cbsel_bottom_callback	( Widget w, XtPointer client_data, XtPointer call_data );
+void expose_cbsel_cbar    	();
+
+static void cbsel_cmap_move  	( Cmaplist **pp_cmlist, int src, int dest );
+static void cmaps_set_current	( Cmaplist *cmlist );
+static XImage *make_cbar_ximage	( Cmaplist *cmlist, int cmap_number );
+static void draw_cbar_ximage	( int cmap_number, XImage *ximage );
+static void handle_colormap_list_change();
 
 /********************************************************************************************/
 	void
 set_options( void )
 {
 	int	llx, lly, urx, ury;
-	int	current_overlay, new_overlay, current_shrink, new_shrink;
-
-	current_overlay = overlay_current(); 
-	RadioWidget_set_current( overlay_widget, current_overlay );
+	int	err, new_overlay, new_shrink;
+	Stringlist	*state_to_save;
+	char	error_message[ 2040 ];
+	long	l_current_overlay, l_current_shrink;
+
+	/* Get current settings, apply them to the widgets */
+	l_current_overlay = (long)(overlay_current()); 
+	RadioWidget_set_current( overlay_widget, l_current_overlay );
+
+	l_current_shrink = (long)(options.shrink_method);
+	RadioWidget_set_current( shrink_widget, l_current_shrink );
+
+	/* Make local duplicate of global colormap list.  We do this so that
+	 * we can make changes only on the local list, and so discard all
+	 * changes if the user clicks "Cancel". One ramification though is
+	 * that this step duplicates the storage for the cmap list as well.
+	 * That means that if the user cancels, we have to delete the duplicated
+	 * local cmap list (setopts_cmaplist), but if the user accepts the
+	 * changes, we delete the original list (colormap_list).
+	 */
+	setopts_cmaplist = dup_whole_cmaplist( colormap_list );  
 
-	current_shrink = options.shrink_method;
-	RadioWidget_set_current( shrink_widget, current_shrink );
+	/* Apply information from the setopts_cmaplist to the widgets (name, etc) */
+	cmaps_set_current( setopts_cmaplist );	
 
 	/********** Pop up the window **********/
 	x_get_window_position( &llx, &lly, &urx, &ury );
@@ -115,22 +181,42 @@ set_options( void )
 
 		/* Do overlay */
 		new_overlay = RadioWidget_query_current( overlay_widget );
-		if( (new_overlay != current_overlay) || (new_overlay == overlay_custom_n()) ) {
+		if( (new_overlay != l_current_overlay) || (new_overlay == overlay_custom_n()) ) {
 			do_overlay( new_overlay, overlay_filename, FALSE );
 			}
 		else
 			; /* printf( "no changes in overlay\n" ); */
 
 		/* Do shrink */
-		new_shrink = RadioWidget_query_current( shrink_widget );
-		if( new_shrink != current_shrink ) {
+		new_shrink = (int)(RadioWidget_query_current( shrink_widget ));
+		if( new_shrink != l_current_shrink ) {
 			options.shrink_method = new_shrink;
 			invalidate_all_saveframes();
 			change_view( 0, FRAMES );
 			}
+
+		/* Handle the change in the colormap list */
+		handle_colormap_list_change();
+
+		/* Save persistent options in our state file */
+		state_to_save = NULL;	/* signal we want to create new stringlist */
+		if( (err = colormap_options_to_stringlist( &state_to_save )) != 0 ) {
+			sprintf( error_message, "Error %d while trying to save colormap options. Look in launching window to see more information.\n", err );
+			in_error( error_message );
+			}
+		if( (err = write_state_to_file( state_to_save )) != 0 ) {
+			sprintf( error_message, "Error %d while trying to save options file. Look in launching window to see more information.\n", err );
+			in_error( error_message );
+			}
+		stringlist_delete_entire_list( state_to_save );
 		}
+
 	else if( opt_popup_result == MESSAGE_CANCEL ) {
-		;
+
+		/* Free up space from temporary colormap list the user
+		 * was manipulating, they don't want it
+		 */
+		delete_cmaplist( setopts_cmaplist );
 		}
 	else
 		{
@@ -141,8 +227,66 @@ set_options( void )
 
 /********************************************************************************************/
 	void
+handle_colormap_list_change()
+{
+	int		n_cm_enabled;
+	Cmaplist	*cursor, *first_enabled_cm, *tmp_old_colormap_list;
+	char		*colormap_name;
+
+	/* Save pointer to OLD colormap list so we can delete it
+	 */
+	tmp_old_colormap_list = colormap_list;
+
+	/* Transfer new colormap list to global one. NOTE that this is
+	 * just copying the pointer, so with this step all the storage
+	 * of the original colormap_list has just been orphaned. 
+	 */
+	colormap_list = setopts_cmaplist;
+
+	/* Make sure at least one colormap is enabled. If none are,
+	 * then enable the first one.
+	 */
+	first_enabled_cm = NULL;
+	n_cm_enabled = colormap_list->enabled;
+	if( colormap_list->enabled )
+		first_enabled_cm = colormap_list;
+	cursor = colormap_list;
+	while( cursor->next != NULL ) {
+		cursor = cursor->next;
+		n_cm_enabled = n_cm_enabled + cursor->enabled;
+		if( (first_enabled_cm == NULL ) && (cursor->enabled))
+			first_enabled_cm = cursor;
+		}
+	if( n_cm_enabled == 0 ) {
+		colormap_list->enabled = 1;
+		first_enabled_cm = colormap_list;
+		}
+
+	/* Set our current colormap to the first enabled one */
+	current_colormap_list = first_enabled_cm;
+
+	/* Update display to reflect new colormap */
+	colormap_name = x_change_colormap( 0, TRUE );
+	in_set_label( LABEL_COLORMAP_NAME, colormap_name );
+	view_draw( TRUE, FALSE );
+	view_recompute_colorbar();
+
+	/* Now that we are completely using the new colormap
+	 * list, we can delete the original one
+	 */
+	delete_cmaplist( tmp_old_colormap_list );
+}
+
+/********************************************************************************************/
+	void
 set_options_init()
 {
+	int	n_colormaps;
+	char	cmap_widget_name[1024];
+	Widget	prev_widget;
+	XImage 	*pxi;
+	long	ll;
+
 	opt_popup_widget = XtVaCreatePopupShell(
 		"Set Options",
 		transientShellWidgetClass,
@@ -174,8 +318,8 @@ set_options_init()
 		overlay_widget = RadioWidget_init( 
 			opt_overlays_box_widget,	/* parent */
 			opt_overlays_label_widget, 	/* widget to be fromVert */
-			overlay_n_overlays(), 
-			overlay_current(), 
+			(long)overlay_n_overlays(), 
+			(long)overlay_current(), 
 			overlay_names(), 
 			&open_circle_pixmap, &closed_circle_pixmap,
 			overlay_set_callback, overlay_unset_callback );
@@ -229,18 +373,199 @@ set_options_init()
 		shrink_widget = RadioWidget_init( 
 			opt_shrink_box_widget,		/* parent */
 			opt_shrink_label_widget, 	/* widget to be fromVert */
-			2,
-			0,
+			2L,
+			0L,
 			shrink_labels,
 			&open_circle_pixmap, &closed_circle_pixmap,
 			NULL, NULL );
 
+	opt_cbsel_viewport_widget = XtVaCreateManagedWidget(
+		"Colorbar selection viewport",
+		viewportWidgetClass,
+		opt_popupcanvas_widget,
+		XtNfromVert, opt_shrink_box_widget,
+		XtNwidth, CMAP_VIEWPORT_WIDTH,
+		XtNheight, CMAP_VIEWPORT_HEIGHT,
+		XtNallowHoriz, False,
+		XtNallowVert,  True,
+		NULL );
+
+
+	opt_cbsel_form_widget = XtVaCreateManagedWidget(
+		"opt_cbsel_form_widget",
+		formWidgetClass,
+		opt_cbsel_viewport_widget,
+		NULL );
+
+		opt_cbsel_label_widget = XtVaCreateManagedWidget(
+			"opt_cbsel_label_widget",	
+			labelWidgetClass,	
+			opt_cbsel_form_widget,
+			XtNlabel, "Select colormaps to enable, and the order to show them:",
+			XtNborderWidth, 0, 
+			NULL );
+
+		opt_cbsel_cmap_all_or_none_widget = XtVaCreateManagedWidget(
+			"opt_cbsel_cmap_all_or_none_widget",
+			boxWidgetClass,	
+			opt_cbsel_form_widget,
+			XtNorientation, XtorientHorizontal,
+			XtNfromVert, opt_cbsel_label_widget,
+			XtNborderWidth, 1, 
+			NULL );
+
+				opt_cbsel_enable_all_widget = XtVaCreateManagedWidget(
+					"opt_cbsel_enable_all_widget",
+					commandWidgetClass,	
+					opt_cbsel_cmap_all_or_none_widget,
+					XtNlabel, "Enable All",
+					XtNborderWidth, 1, 
+					NULL );
+				XtAddCallback( opt_cbsel_enable_all_widget, XtNcallback, cbsel_enable_all_callback, 0 );
+
+				opt_cbsel_enable_none_widget = XtVaCreateManagedWidget(
+					"opt_cbsel_enable_none_widget",
+					commandWidgetClass,	
+					opt_cbsel_cmap_all_or_none_widget,
+					XtNlabel, "Disable All",
+					XtNfromHoriz, opt_cbsel_enable_all_widget,
+					XtNborderWidth, 1, 
+					NULL );
+				XtAddCallback( opt_cbsel_enable_none_widget, XtNcallback, cbsel_enable_none_callback, 0 );
+
+		/* Get number of colormaps that we know about.  Note that there is a
+		 * subtlety here.  We make the widgets early on, and only once.
+		 * We get the number of colormaps from the GLOBAL colormap list.
+		 * That means that we cannot later add to the colormap list, else
+		 * there will be more on the list than the number of widgets we
+		 * allocate here.
+		 */
+		n_colormaps = x_n_colormaps( colormap_list );
+		if( n_colormaps > 9999 ) {
+			fprintf( stderr, "Error, too many colormaps, max is 9999\n" );
+			exit(-1);
+			}
+
+		/* Make space for all our widgets that go with each colormap */
+		opt_cbsel_cmap_entry_widget = (Widget *)malloc( n_colormaps * sizeof( Widget * ));
+		opt_cbsel_enable_widget     = (Widget *)malloc( n_colormaps * sizeof( Widget * ));
+		opt_cbsel_top_widget        = (Widget *)malloc( n_colormaps * sizeof( Widget * ));
+		opt_cbsel_up_widget         = (Widget *)malloc( n_colormaps * sizeof( Widget * ));
+		opt_cbsel_down_widget       = (Widget *)malloc( n_colormaps * sizeof( Widget * ));
+		opt_cbsel_bottom_widget     = (Widget *)malloc( n_colormaps * sizeof( Widget * ));
+		opt_cbsel_name_widget       = (Widget *)malloc( n_colormaps * sizeof( Widget * ));
+		opt_cbsel_cbar_widget       = (Widget *)malloc( n_colormaps * sizeof( Widget * ));
+		cbar_ximages 		    = (XImage **)malloc( n_colormaps * sizeof( XImage * ));
+
+		prev_widget = opt_cbsel_cmap_all_or_none_widget;
+
+		for( ll=0; ll<n_colormaps; ll++ ) {
+
+			sprintf( cmap_widget_name, "opt_cbsel_cmap_entry_widget_%04ld", ll );
+			opt_cbsel_cmap_entry_widget[ll] = XtVaCreateManagedWidget(
+				cmap_widget_name,
+				boxWidgetClass,	
+				opt_cbsel_form_widget,
+				XtNorientation, XtorientHorizontal,
+				XtNfromVert, prev_widget,
+				XtNborderWidth, 0, 
+				NULL );
+			prev_widget = opt_cbsel_cmap_entry_widget[ll];
+
+				sprintf( cmap_widget_name, "opt_cbsel_cmap_name_widget_%04ld", ll );
+				opt_cbsel_name_widget[ll] = XtVaCreateManagedWidget(
+					cmap_widget_name,
+					labelWidgetClass,	
+					opt_cbsel_cmap_entry_widget[ll],
+					XtNlabel, "-----",
+					XtNborderWidth, 0, 
+					XtNwidth, CMAP_NAME_WIDTH,
+					NULL );
+
+				sprintf( cmap_widget_name, "opt_cbsel_cmap_enable_widget_%04ld", ll );
+				opt_cbsel_enable_widget[ll] = XtVaCreateManagedWidget(
+					cmap_widget_name,
+					toggleWidgetClass,	
+					opt_cbsel_cmap_entry_widget[ll],
+					XtNlabel, "Enable",
+					XtNborderWidth, 1, 
+					XtNstate, False,
+					XtNfromHoriz, opt_cbsel_name_widget[ll],
+					NULL );
+				XtAddCallback( opt_cbsel_enable_widget[ll], XtNcallback, cbsel_enable_callback, (XtPointer)ll );
+
+				sprintf( cmap_widget_name, "opt_cbsel_cmap_top_widget_%04ld", ll );
+				opt_cbsel_top_widget[ll] = XtVaCreateManagedWidget(
+					cmap_widget_name,
+					commandWidgetClass,	
+					opt_cbsel_cmap_entry_widget[ll],
+					XtNlabel, "Top",
+					XtNfromHoriz, opt_cbsel_enable_widget[ll],
+					XtNborderWidth, 1, 
+					NULL );
+				XtAddCallback( opt_cbsel_top_widget[ll], XtNcallback, cbsel_top_callback, (XtPointer)ll );
+
+				sprintf( cmap_widget_name, "opt_cbsel_cmap_up_widget_%04ld", ll );
+				opt_cbsel_up_widget[ll] = XtVaCreateManagedWidget(
+					cmap_widget_name,
+					commandWidgetClass,	
+					opt_cbsel_cmap_entry_widget[ll],
+					XtNlabel, "^",
+					XtNfromHoriz, opt_cbsel_top_widget[ll],
+					XtNborderWidth, 1, 
+					NULL );
+				XtAddCallback( opt_cbsel_up_widget[ll], XtNcallback, cbsel_up_callback, (XtPointer)ll );
+
+				sprintf( cmap_widget_name, "opt_cbsel_cmap_down_widget_%04ld", ll );
+				opt_cbsel_down_widget[ll] = XtVaCreateManagedWidget(
+					cmap_widget_name,
+					commandWidgetClass,	
+					opt_cbsel_cmap_entry_widget[ll],
+					XtNfromHoriz, opt_cbsel_up_widget[ll],
+					XtNlabel, "v",
+					XtNborderWidth, 1, 
+					NULL );
+				XtAddCallback( opt_cbsel_down_widget[ll], XtNcallback, cbsel_down_callback, (XtPointer)ll );
+
+				sprintf( cmap_widget_name, "opt_cbsel_cmap_bottom_widget_%04ld", ll );
+				opt_cbsel_bottom_widget[ll] = XtVaCreateManagedWidget(
+					cmap_widget_name,
+					commandWidgetClass,	
+					opt_cbsel_cmap_entry_widget[ll],
+					XtNfromHoriz, opt_cbsel_down_widget[ll],
+					XtNlabel, "Bottom",
+					XtNborderWidth, 1, 
+					NULL );
+				XtAddCallback( opt_cbsel_bottom_widget[ll], XtNcallback, cbsel_bottom_callback, (XtPointer)ll );
+
+				sprintf( cmap_widget_name, "opt_cbsel_cmap_cbar_widget_%04ld", ll );
+				opt_cbsel_cbar_widget[ll] = XtVaCreateManagedWidget(
+					cmap_widget_name,
+					simpleWidgetClass,
+					opt_cbsel_cmap_entry_widget[ll],
+					XtNfromHoriz, opt_cbsel_bottom_widget[ll],
+					XtNwidth, options.n_colors,
+					XtNheight, CMAP_CBAR_HEIGHT,
+					NULL );
+
+				XtAddEventHandler( opt_cbsel_cbar_widget[ll], ExposureMask, FALSE,
+					(XtEventHandler)expose_cbsel_cbar, (XtPointer)ll );
+
+				/* NOTE that the following initializes the ximages to be in the same
+				 * order as the global colormap list.  I think this should be OK;
+				 * it then gets modified locally so that it is always current.
+				 */
+				pxi = make_cbar_ximage( colormap_list, ll );	/* "pointer to XImage" */
+				cbar_ximages[ll] = pxi;
+
+			}	/* end of loop over colormaps */
+
 	opt_action_box_widget = XtVaCreateManagedWidget(
 		"opt_action_box_widget",	
 		boxWidgetClass,	
 		opt_popupcanvas_widget,
 		XtNorientation, XtorientHorizontal,
-		XtNfromVert, opt_shrink_box_widget,
+		XtNfromVert, opt_cbsel_viewport_widget,
 		NULL );
 	
 		opt_ok_widget = XtVaCreateManagedWidget(
@@ -260,14 +585,13 @@ set_options_init()
 
        	 	XtAddCallback( opt_cancel_widget, XtNcallback, 
 			opt_popup_callback, (XtPointer)MESSAGE_CANCEL );
-
 }
 
 /********************************************************************************************/
         void
 opt_popup_callback( Widget widget, XtPointer client_data, XtPointer call_data)
 {
-	opt_popup_result = (int)client_data;
+	opt_popup_result = (long)client_data;
 	opt_popup_done   = TRUE;
 }
 
@@ -305,9 +629,9 @@ options_set_overlay_filename( char *fn )
         void
 overlay_set_callback( Widget widget, XtPointer client_data, XtPointer call_data)
 {
-	int butno;
+	long butno;
 
-	butno = (int)client_data;
+	butno = (long)client_data;
 
 	if( butno == 4 )
 		XtVaSetValues( opt_overlays_filename_widget, XtNsensitive, TRUE, NULL );
@@ -317,9 +641,9 @@ overlay_set_callback( Widget widget, XtPointer client_data, XtPointer call_data)
         void
 overlay_unset_callback( Widget widget, XtPointer client_data, XtPointer call_data)
 {
-	int butno;
+	long butno;
 
-	butno = (int)client_data;
+	butno = (long)client_data;
 
 	if( butno == 4 )
 		XtVaSetValues( opt_overlays_filename_widget, XtNsensitive, FALSE, NULL );
@@ -329,13 +653,358 @@ overlay_unset_callback( Widget widget, XtPointer client_data, XtPointer call_dat
         void
 shrink_set_callback( Widget widget, XtPointer client_data, XtPointer call_data)
 {
-	printf("entering shrink_set callback with client_data=%d\n", (int)client_data );
+	printf("entering shrink_set callback with client_data=%ld\n", (long)client_data );
 }
 
 /********************************************************************************************/
         void
 shrink_unset_callback( Widget widget, XtPointer client_data, XtPointer call_data)
 {
-	printf("entering shrink_unset callback with client_data=%d\n", (int)client_data );
+	printf("entering shrink_unset callback with client_data=%ld\n", (long)client_data );
+}
+
+/********************************************************************************************/
+	void
+cbsel_enable_all_callback( Widget w, XtPointer client_data, XtPointer call_data )
+{
+	int		i;
+	Cmaplist	*cursor;
+
+	/* Turn on the 'enabled' bit on all colormaps */
+	cursor = setopts_cmaplist;
+	i = 0;
+	while( cursor != NULL ) {
+		cursor->enabled = 1;
+		cursor = cursor->next;
+
+		/* Update widgets */
+		XtVaSetValues( *(opt_cbsel_enable_widget+i),  XtNstate, True, NULL );
+
+		i++;
+		}
+}
+
+/********************************************************************************************/
+	void
+cbsel_enable_none_callback( Widget w, XtPointer client_data, XtPointer call_data )
+{
+	int		i;
+	Cmaplist	*cursor;
+
+	/* Turn off the 'enabled' bit on all colormaps */
+	cursor = setopts_cmaplist;
+	i = 0;
+	while( cursor != NULL ) {
+		cursor->enabled = 0;
+		cursor = cursor->next;
+
+		/* Update widgets */
+		XtVaSetValues( *(opt_cbsel_enable_widget+i),  XtNstate, False, NULL );
+
+		i++;
+		}
+}
+
+/********************************************************************************************/
+	void
+cbsel_enable_callback( Widget w, XtPointer client_data, XtPointer call_data )
+{
+	int		i;
+	long		cmap_num;
+	Cmaplist	*cursor;
+
+	cmap_num = (long)client_data;
+
+	/* Flip the 'enabled' bit on this colormap */
+	i = 0;
+	cursor = setopts_cmaplist;
+	while( cursor != NULL ) {
+		if( i == cmap_num ) {
+			cursor->enabled = 1 - cursor->enabled;
+			break;
+			}
+		cursor = cursor->next;
+		i++;
+		}
+}
+
+/********************************************************************************************/
+	void
+cbsel_top_callback( Widget w, XtPointer client_data, XtPointer call_data )
+{
+	long	l_cmap_num;
+	int	cmap_num;
+
+	l_cmap_num = (long)client_data;
+	cmap_num   = l_cmap_num;
+
+	while( cmap_num > 0 ) {
+		cbsel_cmap_move( &setopts_cmaplist, cmap_num, cmap_num-1 );
+		cmap_num--;
+		}
+}
+
+/********************************************************************************************/
+	void
+cbsel_up_callback( Widget w, XtPointer client_data, XtPointer call_data )
+{
+	long	l_cmap_num;
+	int	cmap_num;
+
+	l_cmap_num = (long)client_data;
+	cmap_num = l_cmap_num;
+
+	if( cmap_num > 0 ) 	/* can't move number 0 "up" */
+		cbsel_cmap_move( &setopts_cmaplist, cmap_num, cmap_num-1 );
+}
+
+/********************************************************************************************/
+	void
+cbsel_down_callback( Widget w, XtPointer client_data, XtPointer call_data )
+{
+	long	l_cmap_num;
+	int	cmap_num;
+
+	l_cmap_num = (long)client_data;
+	cmap_num = l_cmap_num;
+
+	if( cmap_num < (x_n_colormaps(setopts_cmaplist)-1)) 	/* can't move bottom one "down" */
+		cbsel_cmap_move( &setopts_cmaplist, cmap_num, cmap_num+1 );
+}
+
+/********************************************************************************************/
+	void
+cbsel_bottom_callback( Widget w, XtPointer client_data, XtPointer call_data )
+{
+	long	l_cmap_num;
+	int	cmap_num;
+
+	l_cmap_num = (long)client_data;
+	cmap_num = l_cmap_num;
+
+	while( cmap_num < (x_n_colormaps(setopts_cmaplist)-1)) {
+		cbsel_cmap_move( &setopts_cmaplist, cmap_num, cmap_num+1 );
+		cmap_num++;
+		}
+}
+
+/********************************************************************************************
+ * src is the index on the cmlist of the colormap we are moving. dest is the index
+ * that the src is supposed to be moved to.
+ * Note we need to be passed a pointer to a pointer to the cmaplist, since the passed
+ * routine supplies what it thinks is a pointer to the head of the list. If we rearrange
+ * entries, what was the head won't necessarily still be the head any more. 
+ */
+	static void
+cbsel_cmap_move( Cmaplist **pp_cmlist, int src, int dest ) 
+{
+	int		n_colormaps;
+	Cmaplist	**cm_ptrs, *cursor, *t_cmp, *cm_src, *cm_dest;
+	int		i;
+	XImage		*txi;
+
+	/* It's actually rather annoyingly involved swapping elements on a doubly 
+	 * linked list, when you take accout of the fact that they could be the
+	 * head or tail of the list, might be in consecutive order, etc.
+	 * My method is to make a simple list of the pointers, swap those, and
+	 * then rebuild all the references. It may be slightly slower, but it 
+	 * sure is a hell of a lot easier to understand and debug!!
+	 */
+	n_colormaps = x_n_colormaps( *pp_cmlist );
+	if( (src < 0) || (src >= n_colormaps) || (dest < 0) || (dest >= n_colormaps)) {
+		fprintf( stderr, "Internal error: bad src or dest, needs to be between 1 and number of colormaps\n" );
+		fprintf( stderr, "src=%d dest=%d n_colormaps=%d\n", src, dest, n_colormaps );
+		exit(-1);
+		}
+	cm_ptrs = (Cmaplist **)malloc( sizeof( Cmaplist * ) * n_colormaps );
+	cursor  = *pp_cmlist;
+	i = 0;
+	while( cursor != NULL ) {
+		cm_ptrs[i++] = cursor;
+		cursor = cursor->next;
+		}
+
+	cm_src  = cm_ptrs[src];
+	cm_dest = cm_ptrs[dest];
+
+	/* Do the swap */
+	t_cmp = cm_ptrs[dest];
+	cm_ptrs[dest] = cm_ptrs[src];
+	cm_ptrs[src ] = t_cmp;
+
+	/* Rebuild the double links */
+	i = 0;
+	*pp_cmlist = cm_ptrs[0];	/* set head of the list */
+	cursor  = *pp_cmlist;
+	while( cursor != NULL ) {
+		t_cmp = cm_ptrs[i];
+		if( i == 0 )
+			t_cmp->prev = NULL;
+		else
+			t_cmp->prev = cm_ptrs[i-1];
+		if( i == (n_colormaps-1))
+			t_cmp->next = NULL;
+		else
+			t_cmp->next = cm_ptrs[i+1];
+
+		cursor = cursor->next;
+		i++;
+		}
+
+	free( cm_ptrs );
+
+	XtVaSetValues( *(opt_cbsel_name_widget+src),  XtNlabel, cm_dest->name, XtNwidth, CMAP_NAME_WIDTH, NULL );
+	XtVaSetValues( *(opt_cbsel_name_widget+dest), XtNlabel, cm_src->name,  XtNwidth, CMAP_NAME_WIDTH, NULL );
+
+	/* Switch the ximages (little colorbars) */
+	draw_cbar_ximage( src,  cbar_ximages[dest] );
+	draw_cbar_ximage( dest, cbar_ximages[src]  );
+	txi                = cbar_ximages[dest];
+	cbar_ximages[dest] = cbar_ximages[src];
+	cbar_ximages[src ] = txi;
+
+	/* Switch the 'Enabled' status */
+	XtVaSetValues( *(opt_cbsel_enable_widget+src),  XtNstate, cm_dest->enabled, NULL );
+	XtVaSetValues( *(opt_cbsel_enable_widget+dest), XtNstate, cm_src->enabled,  NULL );
 }
 
+/********************************************************************************************/
+	void 
+expose_cbsel_cbar( Widget w, XtPointer client_data, XExposeEvent *event, Boolean *continue_to_dispatch )
+{
+	int	cmap_number;
+	long	l_cmap_number;
+
+	l_cmap_number = (long)client_data;
+	cmap_number = l_cmap_number;
+
+	if( event->type != Expose ) 
+		return;
+
+	if( (event->count == 0) && (event->width > 1) && (event->height > 1))
+		draw_cbar_ximage( cmap_number, cbar_ximages[cmap_number] );
+}
+
+/***************************************************************************************************/
+static XImage *make_cbar_ximage( Cmaplist *cmlist, int cmap_number )
+{
+	Screen  *screen;
+	Display *display;
+	static 	XImage *ximage;
+	unsigned char *tc_data;
+	static unsigned char *cbar_data=NULL;
+	char	*cmap_name;
+	int	ii, jj, cmap_enabled;
+	XColor	*color_list;
+
+	if( cmlist == NULL )	/* Don't have our colormap list yet */
+		return(NULL);
+
+	/* Can't draw little colorbars on a pseudo color display... */
+	if( options.display_type == PseudoColor )
+		return(NULL);
+
+	if( cbar_data == NULL ) {
+		/* Make SAME data for each colorbar, then it gets translated to true color
+		 * using each individual color map
+		 */
+		cbar_data = (unsigned char *)malloc( sizeof(unsigned char)*options.n_colors*CMAP_CBAR_HEIGHT );
+		for( jj=0; jj<CMAP_CBAR_HEIGHT; jj++ )
+		for( ii=0; ii<options.n_colors;  ii++ )
+			*(cbar_data+ii+jj*options.n_colors) = (unsigned char)ii + options.n_extra_colors;
+		}
+
+	display = XtDisplay( topLevel );
+	screen  = XtScreen ( topLevel );        /* Note: a pointer to Screen struct, NOT the integer screen number (Use DefaultScreen(display) for that) */
+	if( display == NULL )
+		return(NULL);
+	if( screen == NULL )
+		return(NULL);
+
+	x_colormap_info( cmlist, cmap_number, &cmap_name, &cmap_enabled, &color_list );
+
+	/* Make the little colorbar */
+	tc_data = (unsigned char *)malloc( server.bitmap_unit*options.n_colors*CMAP_CBAR_HEIGHT );
+	make_tc_data( cbar_data, options.n_colors, CMAP_CBAR_HEIGHT, color_list, tc_data );
+
+	ximage  = XCreateImage(
+		display,
+		XDefaultVisualOfScreen( screen ),
+		XDefaultDepthOfScreen ( screen ),
+		ZPixmap,
+		0,
+		(char *)tc_data,
+		(unsigned int)options.n_colors, (unsigned int)CMAP_CBAR_HEIGHT,
+		32, 0 );
+
+	/* NOTE: can't free tc_data here, seems to be kept in the ximage structure 
+	 * and must be valid.  Guess it copies the pointer, not the data
+	 */
+
+	return( ximage );
+}
+
+/***************************************************************************************************/
+static void draw_cbar_ximage( int cmap_number, XImage *ximage )
+{
+	Screen  *screen;
+	Display *display;
+	GC	gc;
+	XGCValues values;
+
+	gc = XtGetGC( opt_popup_widget, (XtGCMask)0, &values );
+
+	/* Check to make sure everything is cool before we try to set the image;
+	 * sometimes with X, events can arrive before things have been instanciated
+	 */
+	if( opt_cbsel_cbar_widget == NULL )
+		return;
+	if( opt_cbsel_cbar_widget[cmap_number] == NULL )
+		return;
+	if( XtWindow( opt_cbsel_cbar_widget[cmap_number] ) == (Window)NULL )
+		return;
+
+	display = XtDisplay( topLevel );
+	screen  = XtScreen ( topLevel );        /* Note: a pointer to Screen struct, NOT the integer screen number (Use DefaultScreen(display) for that) */
+
+	XPutImage(
+		display,
+		XtWindow( opt_cbsel_cbar_widget[cmap_number] ),
+		gc,
+		ximage,
+		0, 0, 0, 0,
+		(unsigned int)options.n_colors, (unsigned int)CMAP_CBAR_HEIGHT );
+}
+
+/********************************************************************************************************/
+/* Give the LOCAL COPY of the global colormap list (which we may modify during the course of this
+ * funcation, and possibly discard if the user selects "cancel" instead of "OK"), this sets the
+ * widget names and colormaps to reflect that local colormap list ("cmlist").
+ */
+static void cmaps_set_current( Cmaplist *cmlist )
+{
+	int	ncmaps, ii;
+	char	*cmap_name;
+	int	cmap_enabled;
+	XColor	*color_list;
+
+	ncmaps = x_n_colormaps( cmlist );
+	if( ncmaps == 0 ) return;
+
+	for( ii=0; ii<ncmaps; ii++ ) {
+		/* Get colormap name and whether or not it is enabled */
+		x_colormap_info( cmlist, ii, &cmap_name, &cmap_enabled, &color_list );
+		XtVaSetValues( opt_cbsel_name_widget[ii], 
+			XtNlabel, cmap_name, 
+			XtNwidth, CMAP_NAME_WIDTH,
+			NULL );
+
+		/* Set the little colorbar image to the correct ximage */
+		draw_cbar_ximage( ii, cbar_ximages[ii] );
+
+		/* Set whether or not this colormap is enabled */
+		XtVaSetValues( opt_cbsel_enable_widget[ii], 
+			XtNstate, cmap_enabled, 
+			NULL );
+		}
+}
diff --git a/src/interface/x_interface.c b/src/interface/x_interface.c
index f4499ec..c3b0972 100644
--- a/src/interface/x_interface.c
+++ b/src/interface/x_interface.c
@@ -35,8 +35,9 @@
 #include <X11/CoreP.h>
 #include <X11/CoreP.h>
 
-#ifdef INC_PPM
-#include "ppm.h"
+#ifdef HAVE_PNG
+#include <png.h>
+#include <setjmp.h>
 #endif
 
 #define DEFAULT_BUTTON_WIDTH	55
@@ -47,7 +48,6 @@
 #define DEFAULT_BLOWUP_SIZE	300
 #define DEFAULT_VAR_COLORS	1
 #define DEFAULT_AUTO_OVERLAY	1
-#define N_EXTRA_COLORS		10
 #define CBAR_HEIGHT		24
 
 #define XtNlabelWidth 		"labelWidth"
@@ -81,30 +81,6 @@
 #define XtNforeground5d		"foreground5d"
 #define XtCforeground5d		"Foreground5d"
 
-#define	ORDER_RGB	1 	/* R mask > B mask */
-#define	ORDER_BGR	2	/* B mask > R mask */
-
-/* This is used to hold key info about the X server
- * that we use when we try to create an image.
- */
-typedef struct {
-	int	bits_per_pixel, 
-		byte_order,
-		bytes_per_pixel, 
-		bitmap_unit,
-		bitmap_pad,
-		rgb_order,
-		shift_red,
-		shift_green_upper, shift_green_lower,
-		shift_blue,
-		depth,
-		width,
-		height;
-	unsigned long	mask_red,
-		mask_green_upper, mask_green_lower,
-		mask_blue;
-} Server_Info;
-
 /**************************/
 extern 	NCVar	  *variables;
 extern  Options	  options;
@@ -131,24 +107,23 @@ typedef struct {
 	Pixel	foreground5d;
 } AppData, *AppDataPtr;
 
-typedef struct {
-	XColor		*color_list;
-	void		*next, *prev;
-	char		*name;
-	ncv_pixel	*pixel_transform;
-} Cmaplist;
-
 /* These are "global" to this directory, in the sense that other files
  * in this directory use them.
  */
 Widget 		topLevel;
 XtAppContext 	x_app_context;
+Server_Info	server;
 
-static Cmaplist		*colormap_list   = NULL, *current_colormap_list = NULL;
-static Colormap		current_colormap = (Colormap)NULL;
+/* "Cmaplist" is MY list structure for holding all the colormaps. "colormap_list" is the "official"
+ * list of known colormaps.  current_colormap_list is a time-saving pointer to the actual entry in 
+ * the colormap_list list that is the currently loaded colormap.
+ * "Colormap" is the standard X windows structure holding the colormap.  It is set in x_create_colormap()
+ * Note these are "global" to this directory.
+ */
+Cmaplist		*colormap_list   = NULL, *current_colormap_list = NULL;
+Colormap		current_colormap = (Colormap)NULL;
 
 static AppData		app_data;
-static Server_Info	server;
 static XtIntervalId	timer;
 
 static int		timer_enabled      = FALSE,
@@ -187,11 +162,12 @@ static Widget
 			ccontour_info2_widget,
 	commandcanvas_widget,
                 buttonbox_widget,
-			label1_widget,
-			label2_widget,
-			label3_widget,
-			label4_widget,
-			label5_widget,
+			label1_widget,		/* typically title */
+			label2_widget,		/* typically displayed variable name */
+			label3_widget,		/* typically current scan location */
+			label4_widget,		/* typically min, max info */
+			label5_widget,		/* typically data value under cursor */
+			label6_widget,		/* typically scalar dim info */
                         quit_button_widget,
 			restart_button_widget,
                         reverse_button_widget,
@@ -400,7 +376,6 @@ static Widget	*varsel_menu_widget_list;
 /******************************************************************************
  * These are only used in this file
  */
-void 	new_cmaplist( Cmaplist **cml );
 unsigned char interp( int i, int range_i, unsigned char *mat, int n_entries );
 void	x_init_widgets		( Widget top );
 void	x_init_pixmaps		( Widget top );
@@ -469,17 +444,10 @@ void 	expose_colorbar();
 void 	testf(Widget w, XButtonEvent *e, String *p, Cardinal *n );
 
 static void 	add_callbacks( void );
-static void 	make_tc_data( unsigned char *data, long width, long height, 
-		unsigned char *tc_data );
-static void 	make_tc_data_24( unsigned char *data, long width, long height, 
-		unsigned char *tc_data );
-static void 	make_tc_data_16( unsigned char *data, long width, long height, 
-		unsigned char *tc_data );
-static void 	make_tc_data_32( unsigned char *data, long width, long height, 
-		unsigned char *tc_data );
-#ifdef INC_PPM
-static void 	dump_to_ppm( unsigned char *data, size_t width, size_t height,
-		size_t timestep );
+
+#ifdef HAVE_PNG
+static void 	dump_to_png( unsigned char *data, size_t width, size_t height,
+				size_t timestep );
 #endif
 
 /*************************************************************************************************/
@@ -709,7 +677,7 @@ void x_initialize()
 	XtAddEventHandler( ccontour_widget, 
 		PointerMotionMask | ButtonPressMask,
 		False,
-		track_pointer,
+		(XtEventHandler)track_pointer,
 		NULL );
 
 	plot_xy_init();
@@ -918,6 +886,18 @@ void x_init_widgets_labels( Widget parent )
 		XtNfromVert, label4_widget,
 		XtNwidth, app_data.label_width,
 		NULL);
+
+	label6_widget = XtVaCreateManagedWidget(
+		"label6",
+		labelWidgetClass,
+		parent,
+		XtNlabel, "",
+		XtNfromVert, label5_widget,
+		XtNwidth, app_data.label_width,
+		XtNjustify, XtJustifyLeft,
+		XtNborderWidth, 0,
+		NULL);
+ 
 }
 
 /*************************************************************************************************/
@@ -928,9 +908,10 @@ void x_init_widgets_buttonbox( Widget parent )
 		boxWidgetClass,
 		parent,
 		XtNorientation, XtorientHorizontal,
-		XtNfromVert, label5_widget,
+		XtNfromVert, label6_widget,
 		NULL);
 
+	/* Quit */
 	quit_button_widget = XtVaCreateManagedWidget(
 		"quit",
 		commandWidgetClass,
@@ -939,6 +920,7 @@ void x_init_widgets_buttonbox( Widget parent )
 		XtNwidth, app_data.button_width,
 		NULL);
 
+	/*  ->1  */
 	restart_button_widget = XtVaCreateManagedWidget(
 		"restart",
 		commandWidgetClass,
@@ -949,6 +931,7 @@ void x_init_widgets_buttonbox( Widget parent )
 		XtNwidth, app_data.button_width,
 		NULL);
 
+	/*   <<   */
 	reverse_button_widget = XtVaCreateManagedWidget(
 		"reverse",
 		toggleWidgetClass,
@@ -960,6 +943,7 @@ void x_init_widgets_buttonbox( Widget parent )
 		XtParseTranslationTable( 
 			"#override Ctrl<Btn1Down>,<Btn1Up>: reverse_mod2()" ));
 
+	/*  <  */
 	backwards_button_widget = XtVaCreateManagedWidget(
 		"back",
 		commandWidgetClass,
@@ -971,6 +955,7 @@ void x_init_widgets_buttonbox( Widget parent )
 		XtParseTranslationTable( 
 			"#override Ctrl<Btn1Down>,<Btn1Up>: back_mod2()" ));
 
+	/*   ||   */
 	pause_button_widget = XtVaCreateManagedWidget(
 		"pause",
 		toggleWidgetClass,
@@ -981,6 +966,7 @@ void x_init_widgets_buttonbox( Widget parent )
 		XtNsensitive, False,
 		NULL);
 
+	/*   >   */
 	forward_button_widget = XtVaCreateManagedWidget(
 		"forward",
 		commandWidgetClass,
@@ -993,6 +979,7 @@ void x_init_widgets_buttonbox( Widget parent )
 		XtParseTranslationTable( 
 			"#override Ctrl<Btn1Down>,<Btn1Up>: forward_mod2()" ));
 
+	/*   >>   */
 	fastforward_button_widget = XtVaCreateManagedWidget(
 		"fastforward",
 		toggleWidgetClass,
@@ -1005,6 +992,7 @@ void x_init_widgets_buttonbox( Widget parent )
 		XtParseTranslationTable( 
 			"#override Ctrl<Btn1Down>,<Btn1Up>: fastforward_mod2()" ));
 
+	/*   Edit   */
 	edit_button_widget = XtVaCreateManagedWidget(
 		"Edit",
 		commandWidgetClass,
@@ -1013,6 +1001,7 @@ void x_init_widgets_buttonbox( Widget parent )
 		XtNsensitive, False,
 		NULL);
 
+	/*   ?  */
 	info_button_widget = XtVaCreateManagedWidget(
 		"?",
 		commandWidgetClass,
@@ -1075,7 +1064,7 @@ void x_init_widgets_optionbox( Widget parent )
 		NULL);
 	XtAugmentTranslations( cmap_button_widget,
 		XtParseTranslationTable( 
-			"<Btn3Down>,<Btn3Up>: cmap_mod3()" ));
+			"<Btn3Down>,<Btn3Up>: cmap_mod3()" ));  /* for when the user RIGHT clicks on the button */
 
 	invert_button_widget = XtVaCreateManagedWidget(
 		"Inv P",
@@ -1158,7 +1147,7 @@ void x_init_widgets_optionbox( Widget parent )
  * If place2insert == 0, then new value will go at head of array vlist; if
  * place2insert == 1, new value will go into second place; etc.
  */
-void insert_into_array( int *vlist, int nlist, int val2insert, int place2insert )
+void insert_into_array( long *vlist, int nlist, int val2insert, int place2insert )
 {
 	int i, n_move_down;
 
@@ -1174,7 +1163,7 @@ void insert_into_array( int *vlist, int nlist, int val2insert, int place2insert
 /* 'nlist' is the length of vlist, i.e., the number of variables already in the list; we are 
  * adding the name in array 'names' that has index idx: names[idx]
  */
-void insert_alpha_sorted( NCVar *v, int *vlist, int nlist, int idx, char **names )
+void insert_alpha_sorted( NCVar *v, long *vlist, int nlist, int idx, char **names )
 {
 	int i;
 
@@ -1195,11 +1184,11 @@ void insert_alpha_sorted( NCVar *v, int *vlist, int nlist, int idx, char **names
 }
 
 /*************************************************************************************************/
-void x_sort_vars_by_ndims( NCVar *v, int **vl_1d, int *n_1d, int **vl_2d, int *n_2d, int **vl_3d, int *n_3d,
-		int **vl_4d, int *n_4d, int **vl_other, int *n_other )
+void x_sort_vars_by_ndims( NCVar *v, long **vl_1d, int *n_1d, long **vl_2d, int *n_2d, long **vl_3d, int *n_3d,
+		long **vl_4d, int *n_4d, long **vl_other, int *n_other )
 {
 	NCVar *cursor;
-	int   nmax, i, j;
+	int   nmax, i;
 	char  **names;
 
 	*n_1d = 0;
@@ -1210,11 +1199,11 @@ void x_sort_vars_by_ndims( NCVar *v, int **vl_1d, int *n_1d, int **vl_2d, int *n
 
 	nmax = n_vars_in_list( v );
 	
-	(*vl_1d)    = (int *)malloc( nmax * sizeof( int ));
-	(*vl_2d)    = (int *)malloc( nmax * sizeof( int ));
-	(*vl_3d)    = (int *)malloc( nmax * sizeof( int ));
-	(*vl_4d)    = (int *)malloc( nmax * sizeof( int ));
-	(*vl_other) = (int *)malloc( nmax * sizeof( int ));
+	(*vl_1d)    = (long *)malloc( nmax * sizeof( long ));
+	(*vl_2d)    = (long *)malloc( nmax * sizeof( long ));
+	(*vl_3d)    = (long *)malloc( nmax * sizeof( long ));
+	(*vl_4d)    = (long *)malloc( nmax * sizeof( long ));
+	(*vl_other) = (long *)malloc( nmax * sizeof( long ));
 
 	/* Get names so we can alpha sort them */
 	cursor = v;
@@ -1262,7 +1251,7 @@ void x_sort_vars_by_ndims( NCVar *v, int **vl_1d, int *n_1d, int **vl_2d, int *n
 }
 
 /*************************************************************************************************/
-void x_init_widgets_varsel_menu_inner( Widget parent, int *varlist, int nv, char *tag, Widget *var_menu_2use,
+void x_init_widgets_varsel_menu_inner( Widget parent, long *varlist, int nv, char *tag, Widget *var_menu_2use,
 			Widget *list_of_sel_widgets )
 {
 	char temp[1024], widget_name[1024], var_menu_name[1024];
@@ -1303,10 +1292,18 @@ void x_init_widgets_varsel_menu_inner( Widget parent, int *varlist, int nv, char
 		}
 }
 
-/*************************************************************************************************/
+/*************************************************************************************************
+ * The widget selection area can be in one of two different modes.  In "menu" mode, there is one button
+ * for all the 1D variables, one button for all the 2D variables, ..., up to one button for all the 
+ * variables with dimensionality > 4.  When you click on one of these buttons, a pop-up menu shows
+ * all the variables that can be selected that have that number of dims.
+ * In "list" mode, all the variables are simply listed in the control panel.
+ * For files with a large number of variables, the "list" mode can get too big, hence the
+ * existence of the "menu" mode.
+ */
 void x_init_widgets_varsel_menu( Widget parent )
 {
-	int 	*vl_1d, *vl_2d, *vl_3d, *vl_4d, *vl_other;
+	long 	*vl_1d, *vl_2d, *vl_3d, *vl_4d, *vl_other;
 	int	n_1d, n_2d, n_3d, n_4d, n_other, n_tot;
 	Widget	menu_box;
 
@@ -1569,7 +1566,7 @@ void x_init_widgets( Widget top )
 {
 	int	n_dims;
 	int	max_dims;
-	Stringlist *dim_list, *max_dim_list;
+	Stringlist *dim_list, *max_dim_list=NULL;
 	NCVar	*var;
 
 	x_init_widgets_ccontourpanel( top );
@@ -1605,7 +1602,7 @@ void x_init_widgets( Widget top )
 	 */
 	x_init_widgets_optionbox( commandcanvas_widget );
 
-	/* The colormap widget */
+	/* The colorbar widget */
 	colorbar_form_widget = XtVaCreateManagedWidget(
 		"colormapform",
 		formWidgetClass,
@@ -1649,7 +1646,7 @@ void x_init_widgets( Widget top )
 	var      = variables;
 	while( var != NULL ) {
 		dim_list = fi_scannable_dims( var->first_file->id, var->name );
-		n_dims   = n_strings_in_list( dim_list );
+		n_dims   = stringlist_len( dim_list );
 		if( n_dims > max_dims ) {
 			max_dims     = n_dims;
 			max_dim_list = dim_list;
@@ -1735,192 +1732,6 @@ void create_pixmap( Widget shell_widget, Pixmap *pixmap, int id )
 		}
 }
 
-/***************************************************************************************************/
-/* Return 1 if we alrady have a colormap with the name of the passed argument, and 0 otherwise 
-*/
-int x_seen_colormap_name( char *name )
-{
-	Cmaplist	*cml;
-
-	cml = colormap_list;
-	while( cml != NULL ) {
-		if( strcmp(cml->name, name) == 0 ) 
-			return(1);
-		cml = cml->next;
-		}
-
-	return(0);
-}
-
-/***************************************************************************************************/
-void x_create_colormap( char *name, unsigned char r[256], unsigned char g[256], unsigned char b[256] )
-{
-	Colormap	orig_colormap, new_colormap;
-	Display		*display;
-	int		i, status;
-	XColor		*color;
-	unsigned long	plane_masks[1], pixels[1];
-	Cmaplist	*cmaplist, *cml;
-	static int	first_time_through = FALSE;
-
-	display = XtDisplay( topLevel );
-
-	if( colormap_list == NULL )
-		first_time_through = TRUE;
-	else
-		first_time_through = FALSE;
-
-	/* Make a new Cmaplist structure, and link it into the list */
-	new_cmaplist( &cmaplist );
-	cmaplist->name = (char *)malloc( (strlen(name)+1)*sizeof(char) );
-	strcpy( cmaplist->name, name );
-	if( first_time_through )
-		colormap_list = cmaplist;
-	else
-		{
-		cml = colormap_list;
-		while( cml->next != NULL )
-			cml = cml->next;
-		cml->next      = cmaplist;
-		cmaplist->prev = cml;
-		}
-
-	if( first_time_through ) {
-
-		/* First time through, allocate the read/write entries in the colormap.
-		 * We always do ten more than the number of colors requested so that
-		 * black can indicate 'fill_value' entries, and the other color entries
-		 * (which are the window elements) can be colored as desired.
-		 */
-		current_colormap_list = cmaplist;
-
-		/* TrueColor device */
-		if( options.display_type == TrueColor ) {
-			for( i=0; i<(options.n_colors+N_EXTRA_COLORS); i++ ) {
-				(cmaplist->color_list+i)->pixel = (long)i;
-				*(cmaplist->pixel_transform+i)  = (ncv_pixel)i;
-				}
-			}
-
-		/* Shared colormap, PseudoColor device */
-		if( (!options.private_colormap) && (options.display_type == PseudoColor) ) {
-			/* Try the standard colormap, and see if 
-			 * it has enough available colorcells.
-			 */
-			orig_colormap    = DefaultColormap( display, 0 );
-			current_colormap = orig_colormap;
-			i      = 0;
-			status = 1;
-			while( (i < (options.n_colors+N_EXTRA_COLORS)) && (status != 0) ) {
-				status = XAllocColorCells( display, orig_colormap, True, 
-					plane_masks, 0, pixels, 1 );
-				(cmaplist->color_list+i)->pixel = *pixels;
-				*(cmaplist->pixel_transform+i)   = (ncv_pixel)*pixels;
-				i++;
-				}
-			}
-
-		/* standard colormap failed for PseudoColor, allocate a private colormap */
-		if( (options.display_type == PseudoColor) && 
-				((status == 0) || (options.private_colormap)) ) {	
-			printf( "Using private colormap...\n" );
-			new_colormap  = XCreateColormap(
-				display,
-				RootWindow( display, DefaultScreen( display ) ),
-				XDefaultVisualOfScreen( XtScreen( topLevel ) ),
-				AllocNone ); 
-			current_colormap = new_colormap;
-			for( i=0; i<(options.n_colors+N_EXTRA_COLORS); i++ )
-				{
-				status = XAllocColorCells( display, new_colormap, 
-						True, plane_masks,
-						0, pixels, 1 );
-				if( status == 0 ) {
-					fprintf( stderr, "ncview: x_create_colormap: couldn't allocate \n" );
-					fprintf( stderr, "requested number of colorcells in a private colormap\n" );
-					fprintf( stderr, "Try requesting fewer colors with the -nc option\n" );
-					exit( -1 );
-					}
-				(cmaplist->color_list+i)->pixel = *pixels;
-				*(cmaplist->pixel_transform+i)  = (ncv_pixel)*pixels;
-				}
-			}
-		pixel_transform = cmaplist->pixel_transform;
-		}
-	else
-		{
-		/* if NOT the first time through, just set the pixel values */
-		for( i=0; i<options.n_colors+N_EXTRA_COLORS; i++ ) {
-			(cmaplist->color_list+i)->pixel =
-				(current_colormap_list->color_list+i)->pixel;
-			*(cmaplist->pixel_transform+i)   = 
-				(ncv_pixel)(current_colormap_list->color_list+i)->pixel;
-			}
-		}
-
-	/* Set the first ten colors including black, the color used for "Fill_Value" entries */
-	for( i=0; i<N_EXTRA_COLORS; i++ ) {
-		color        = cmaplist->color_list+i;
-		color->flags = DoRed | DoGreen | DoBlue;
-		color->red   = 256*(unsigned int)255;
-		color->green = 256*(unsigned int)255;
-		color->blue  = 256*(unsigned int)255;
-		}
-	color        = cmaplist->color_list+1;
-	color->flags = DoRed | DoGreen | DoBlue;
-	color->red   = 256*(unsigned int)0;
-	color->green = 256*(unsigned int)0;
-	color->blue  = 256*(unsigned int)0;
-
-	for( i=N_EXTRA_COLORS; i<options.n_colors+N_EXTRA_COLORS; i++ )
-		{
-		color        = cmaplist->color_list+i;
-		color->flags = DoRed | DoGreen | DoBlue;
-		color->red   = (unsigned int)
-				(256*interp( i-N_EXTRA_COLORS, options.n_colors, r, 256 ));
-		color->green = (unsigned int)
-				(256*interp( i-N_EXTRA_COLORS, options.n_colors, g, 256 ));
-		color->blue  = (unsigned int)
-				(256*interp( i-N_EXTRA_COLORS, options.n_colors, b, 256 ));
-		}
-
-	if( (options.display_type == PseudoColor) && first_time_through )
-		XStoreColors( XtDisplay(topLevel), current_colormap, current_colormap_list->color_list,
-			options.n_colors+N_EXTRA_COLORS );
-}
-
-/*************************************************************************************************/
-/* Go forward or backwards in the colormap list, and install the new one.
- * Returns the name of the newly installed colormap.  If do_widgets_flag
- * is false, don't install colormaps on the widgets, just on the topLevel.
- */
-char *x_change_colormap( int delta, int do_widgets_flag )
-{
-	if( delta > 0 )
-		{
-		if( current_colormap_list->next != NULL )
-			current_colormap_list = current_colormap_list->next;
-		else
-			current_colormap_list = colormap_list;
-		}
-	else
-		{
-		if( current_colormap_list->prev != NULL )
-			current_colormap_list = current_colormap_list->prev;
-		else /* go to last colormap */
-			while( current_colormap_list->next != NULL )
-				current_colormap_list = current_colormap_list->next;
-		}
-
-	if( options.display_type == PseudoColor )
-		XStoreColors( XtDisplay(topLevel), current_colormap, 
-			current_colormap_list->color_list,
-			options.n_colors+1 );
-	pixel_transform = current_colormap_list->pixel_transform;
-
-	return( current_colormap_list->name );
-}
-
 /*************************************************************************************************/
 void x_draw_2d_field( unsigned char *data, size_t width, size_t height, size_t timestep )
 {
@@ -1932,9 +1743,9 @@ void x_draw_2d_field( unsigned char *data, size_t width, size_t height, size_t t
 	static	size_t last_width=0L, last_height=0L;
 	static 	unsigned char *tc_data=NULL;
 
-#ifdef INC_PPM
+#ifdef HAVE_PNG
 	if( options.dump_frames )
-		dump_to_ppm( data, width, height, timestep );
+		dump_to_png( data, width, height, timestep );
 #endif
 
 	display = XtDisplay( ccontour_widget );
@@ -1958,7 +1769,7 @@ void x_draw_2d_field( unsigned char *data, size_t width, size_t height, size_t t
 		/* Convert data to TrueColor representation, with
 		 * the proper number of bytes per pixel
 		 */
-		make_tc_data( data, width, height, tc_data );
+		make_tc_data( data, width, height, current_colormap_list->color_list, tc_data );
 
 		ximage  = XCreateImage(
 			display,
@@ -1998,155 +1809,6 @@ void x_draw_2d_field( unsigned char *data, size_t width, size_t height, size_t t
 }
 
 /*************************************************************************************************/
-/* Converts the byte-scaled data to truecolor representation,
- * using the current color map.  
- */
-static void make_tc_data( unsigned char *data, long width, long height, 
-	unsigned char *tc_data )
-{
-	switch (server.bytes_per_pixel) {
-		case 4: make_tc_data_32( data, width, height, tc_data );
-			break;
-
-		case 3:
-			make_tc_data_24( data, width, height, tc_data );
-			break;
-
-		case 2:
-			make_tc_data_16( data, width, height, tc_data );
-			break;
-
-		default:
-			fprintf( stderr, "Sorry, I am not set up to produce ");
-			fprintf( stderr, "images of %d bytes per pixel.\n", 
-					server.bytes_per_pixel );
-			exit( -1 );
-			break;
-		}
-}
-
-/*************************************************************************************************/
-static void make_tc_data_16( unsigned char *data, long width, long height, 
-		unsigned char *tc_data )
-{
-	int	i, j, pix;
-	size_t	pad_offset, po_val;
-
-	/* pad to server.bitmap_pad bits if required */
-	pad_offset = 0L;
-	po_val     = 0L;
-	if( (width%2 != 0) && (server.bits_per_pixel != server.bitmap_pad) ) 
-		po_val = 2L;
-
-	/****************************************
-	 *    Least significant bit first
-	 ****************************************/
-	for( j=0; j<height; j++ ) {
-		for( i=0; i<width; i++ ) {
-
-			pix = *(data+i+j*width);
-
-			*(tc_data+i*2+j*(width*2)+pad_offset) = 
-				(unsigned char)((current_colormap_list->color_list+pix)->blue>>server.shift_blue & server.mask_blue);
-
-			*(tc_data+i*2+1+j*(width*2)+pad_offset) = 
-				(unsigned char)((current_colormap_list->color_list+pix)->green>>server.shift_green_upper & server.mask_green_upper);
-
-
-			*(tc_data+i*2+j*(width*2)+pad_offset) +=
-				(unsigned char)((current_colormap_list->color_list+pix)->green>>server.shift_green_lower & server.mask_green_lower );
-
-			*(tc_data+i*2+1+j*(width*2)+pad_offset) +=
-				(unsigned char)((current_colormap_list->color_list+pix)->red>>server.shift_red & server.mask_red );
-			}
-		pad_offset += po_val;
-		}
-}
-
-/*************************************************************************************************/
-static void make_tc_data_24( unsigned char *data, long width, long height, 
-		unsigned char *tc_data )
-{
-	int	i, j, pix, o_r, o_g, o_b;
-	long	pad_offset, po_val;
-
-	if( server.rgb_order == ORDER_RGB ) {
-		o_r = 2;
-		o_g = 1;
-		o_b = 0;
-		}
-	else
-		{
-		o_r = 0;
-		o_g = 1;
-		o_b = 2;
-		}
-
-	/* pad to server.bitmap_pad bits if required */
-	pad_offset = 0L;
-	po_val     = 0L;
-	if( (((width*3)%4) != 0) && (server.bits_per_pixel != server.bitmap_pad) ) 
-		po_val = (server.bitmap_pad/8) - (width*3)%4;
-
-	for( j=0; j<height; j++ ) {
-		for( i=0; i<width; i++ ) {
-
-			pix = *(data+i+j*width);
-			*(tc_data+i*3+o_b+j*(width*3)+pad_offset) = 
-				(char)((current_colormap_list->color_list+pix)->blue>>8);
-			*(tc_data+i*3+o_g+j*(width*3)+pad_offset) = 
-				(char)((current_colormap_list->color_list+pix)->green>>8);
-			*(tc_data+i*3+o_r+j*(width*3)+pad_offset) = 
-				(char)((current_colormap_list->color_list+pix)->red>>8);
-			}
-		pad_offset += po_val;
-		}
-}
-
-/*************************************************************************************************/
-static void make_tc_data_32( unsigned char *data, long width, long height, 
-		unsigned char *tc_data )
-{
-	int	i, j, pix, o_r, o_g, o_b;
-
-	if( server.rgb_order == ORDER_RGB ) {
-		o_r = 2;
-		o_g = 1;
-		o_b = 0;
-		}
-	else
-		{
-		o_r = 0;
-		o_g = 1;
-		o_b = 2;
-		}
-	if( server.byte_order == MSBFirst ) {
-		o_r++;
-		o_g++;
-		o_b++;
-		}
-
-	for( i=0; i<width; i++ )
-	for( j=0; j<height; j++ ) {
-
-/*
-*(tc_data+i*4+0 +j*(width*4)) = 0;
-*(tc_data+i*4+1 +j*(width*4)) = 0;
-*(tc_data+i*4+2 +j*(width*4)) = 128;
-*(tc_data+i*4+3 +j*(width*4)) = 0;
-printf( "%d ", pix);
-*/
-		pix = *(data+i+j*width);
-		*(tc_data+i*4+o_b+j*(width*4)) = 
-			(char)((current_colormap_list->color_list+pix)->blue>>8);
-		*(tc_data+i*4+o_g+j*(width*4)) = 
-			(char)((current_colormap_list->color_list+pix)->green>>8);
-		*(tc_data+i*4+o_r+j*(width*4)) = 
-			(char)((current_colormap_list->color_list+pix)->red>>8);
-		}
-}
-	
-/*************************************************************************************************/
 void x_set_speed_proc( Widget scrollbar, XtPointer client_data, XtPointer position )
 {
 	float	f_pos;
@@ -2247,26 +1909,30 @@ void x_set_2d_size( size_t width, size_t height )
 void x_set_label( int id, char *string )
 {
 	switch( id ) {
-		case LABEL_1:
+		case LABEL_1:	/* usually title */
 			x_set_lab( label1_widget, string, app_data.label_width );
 			break;
 
-		case LABEL_2:
+		case LABEL_2:	/* usually scan variable name */
 			x_set_lab( label2_widget, string, app_data.label_width );
 			break;
 
-		case LABEL_3:
+		case LABEL_3:	/* usually scan place */
 			x_set_lab( label3_widget, string, app_data.label_width );
 			break;
 
-		case LABEL_4:
+		case LABEL_4:	/* usually min,max info */
 			x_set_lab( label4_widget, string, app_data.label_width );
 			break;
 
-		case LABEL_5:
+		case LABEL_5:	/* usually data value */
 			x_set_lab( label5_widget, string, app_data.label_width );
 			break;
 
+		case LABEL_6:	/* usually scalar coord info */
+			x_set_lab( label6_widget, string, app_data.label_width );
+			break;
+
 		case LABEL_COLORMAP_NAME:
 			x_set_lab( cmap_button_widget, string,
 							app_data.button_width );
@@ -3021,8 +2687,8 @@ int x_set_scan_dims( Stringlist *dim_list, char *x_axis_name, char *y_axis_name,
 		for( i=strlen(x_prefix); *(new_xdim_name+i) != '\0'; i++ )
 			*(new_xdim_name+i-strlen(x_prefix)) = *(new_xdim_name+i);
 		*(new_xdim_name+i-strlen(x_prefix)) = '\0';
-		add_to_stringlist( new_dim_list, new_ydim_name, NULL );
-		add_to_stringlist( new_dim_list, new_xdim_name, NULL );
+		stringlist_add_string( new_dim_list, new_ydim_name, NULL, SLTYPE_NULL );
+		stringlist_add_string( new_dim_list, new_xdim_name, NULL, SLTYPE_NULL );
 		}
 
 	XtPopdown( dimsel_popup_widget );
@@ -3040,7 +2706,11 @@ int x_set_scan_dims( Stringlist *dim_list, char *x_axis_name, char *y_axis_name,
 /*************************************************************************************************/
 void dimsel_callback( Widget widget, XtPointer client_data, XtPointer call_data)
 {
-	dimsel_popup_result = (int)client_data;
+	long	l_client_data;
+
+	l_client_data = (long)client_data;
+
+	dimsel_popup_result = (int)l_client_data;
 	dimsel_popup_done   = TRUE;
 }
 
@@ -3057,7 +2727,7 @@ void x_make_dim_button_util( int dimension, Stringlist *dim_list, char *prefix,
 	/* Make the widget array; set the last element to NULL so that 
 	 * we can find it later.
 	 */
-	n_dims          = n_strings_in_list( dim_list );
+	n_dims          = stringlist_len( dim_list );
 	*dimlist_widget = (Widget *)malloc( (n_dims+1)*sizeof(Widget));
 	if( *dimlist_widget == NULL ) {
 		fprintf( stderr, "ncview: x_make_dim_buttons: malloc ");
@@ -3272,7 +2942,11 @@ int x_dialog( char *message, char *ret_string, int want_cancel_button )
 /*************************************************************************************************/
 void error_popup_callback( Widget widget, XtPointer client_data, XtPointer call_data)
 {
-	error_popup_result = (int)client_data;
+	long	l_client_data;
+
+	l_client_data = (long)client_data;
+
+	error_popup_result = (int)l_client_data;
 	error_popup_done   = TRUE;
 }
 
@@ -3354,7 +3028,8 @@ void x_set_cur_dim_value( char *dim_name, char *string )
 /*************************************************************************************************/
 void x_init_dim_info( Stringlist *dims )
 {
-	int	i, n_dims;
+	long	ll;
+	int	n_dims;
 	char	widget_name[128];
 	Dimension bb_width, bb_height;
 
@@ -3362,7 +3037,7 @@ void x_init_dim_info( Stringlist *dims )
 					  XtNheight, &bb_height, NULL );
 
 	x_clear_dim_info();
-	n_dims = n_strings_in_list( dims );
+	n_dims = stringlist_len( dims );
 	diminfo_row_widget = (Widget *)malloc( (n_dims+1)*sizeof(Widget));
 	if( diminfo_row_widget == NULL ) {
 		fprintf( stderr, "ncview: x_init_dim_info: malloc failed ");
@@ -3421,11 +3096,11 @@ void x_init_dim_info( Stringlist *dims )
 	*(diminfo_max_widget   + n_dims) = NULL;
 	*(diminfo_units_widget + n_dims) = NULL;
 
-	for( i=0; i<n_dims; i++ )
+	for( ll=0; ll<n_dims; ll++ )
 		{
-                sprintf( widget_name, "diminfo_row_%1d", i );
-                if( i == 0 )
-			*(diminfo_row_widget+i) = XtVaCreateManagedWidget(
+                sprintf( widget_name, "diminfo_row_%1ld", ll );
+                if( ll == 0 )
+			*(diminfo_row_widget+ll) = XtVaCreateManagedWidget(
 				widget_name,
 				boxWidgetClass,
 				commandcanvas_widget,
@@ -3435,86 +3110,86 @@ void x_init_dim_info( Stringlist *dims )
 				XtNwidth,  bb_width,
 				NULL);
 		else
-			*(diminfo_row_widget+i) = XtVaCreateManagedWidget(
+			*(diminfo_row_widget+ll) = XtVaCreateManagedWidget(
 				widget_name,
 				boxWidgetClass,
 				commandcanvas_widget,
 				XtNorientation, XtorientHorizontal,
-				XtNfromVert, *(diminfo_row_widget + (i-1)),
+				XtNfromVert, *(diminfo_row_widget + (ll-1)),
 				XtNheight, bb_height,
 				XtNwidth,  bb_width,
 				NULL);
 
-		sprintf( widget_name, "diminfo_dim_%1d", i );
-		*(diminfo_dim_widget+i) = XtVaCreateManagedWidget(
+		sprintf( widget_name, "diminfo_dim_%1ld", ll );
+		*(diminfo_dim_widget+ll) = XtVaCreateManagedWidget(
 			widget_name,
 			labelWidgetClass,
-			*(diminfo_row_widget+i),
+			*(diminfo_row_widget+ll),
 			XtNlabel, "",
 			XtNjustify, XtJustifyRight,
 			XtNwidth, 50,
 			XtNborderWidth, 0,
 			NULL);
 
-		sprintf( widget_name, "diminfo_name_%1d", i );
-		*(diminfo_name_widget+i) = XtVaCreateManagedWidget(
+		sprintf( widget_name, "diminfo_name_%1ld", ll );
+		*(diminfo_name_widget+ll) = XtVaCreateManagedWidget(
 			widget_name,
 			labelWidgetClass,
-			*(diminfo_row_widget+i),
+			*(diminfo_row_widget+ll),
 			XtNlabel, dims->string,
 			XtNwidth, app_data.dimlabel_width,
 			XtNborderWidth, 0,
 			NULL);
 
-		sprintf( widget_name, "diminfo_min_%1d", i );
-		*(diminfo_min_widget+i) = XtVaCreateManagedWidget(
+		sprintf( widget_name, "diminfo_min_%1ld", ll );
+		*(diminfo_min_widget+ll) = XtVaCreateManagedWidget(
 			widget_name,
 			labelWidgetClass,
-			*(diminfo_row_widget+i),
+			*(diminfo_row_widget+ll),
 			XtNlabel, "Min:",
 			XtNwidth, app_data.dimlabel_width,
 			XtNborderWidth, 0,
 			NULL);
 
-		sprintf( widget_name, "diminfo_cur_%1d", i );
-		*(diminfo_cur_widget+i) = XtVaCreateManagedWidget(
+		sprintf( widget_name, "diminfo_cur_%1ld", ll );
+		*(diminfo_cur_widget+ll) = XtVaCreateManagedWidget(
 			widget_name,
 			commandWidgetClass,
-			*(diminfo_row_widget+i),
+			*(diminfo_row_widget+ll),
 			XtNlabel, "Current:",
 			XtNwidth, app_data.dimlabel_width,
 			NULL);
-        	XtAddCallback( *(diminfo_cur_widget+i), XtNcallback, 
-      					diminfo_cur_mod1, (XtPointer)i );
+        	XtAddCallback( *(diminfo_cur_widget+ll), XtNcallback, 
+      					diminfo_cur_mod1, (XtPointer)ll );
 
 		/* Add the modifications for the created curr_dimension button;
 		 * Button-3 gives mod3 and holding down control gives mod2.
 		 */
-		XtAugmentTranslations( *(diminfo_cur_widget+i), 
+		XtAugmentTranslations( *(diminfo_cur_widget+ll), 
 			XtParseTranslationTable( 
 				"<Btn3Down>,<Btn3Up>: diminfo_cur_mod3()" ));
-		XtOverrideTranslations( *(diminfo_cur_widget+i), 
+		XtOverrideTranslations( *(diminfo_cur_widget+ll), 
 			XtParseTranslationTable( 
 				"Ctrl<Btn1Down>,<Btn1Up>: diminfo_cur_mod2()" ));
-		XtOverrideTranslations( *(diminfo_cur_widget+i), 
+		XtOverrideTranslations( *(diminfo_cur_widget+ll), 
 			XtParseTranslationTable( 
 				"Ctrl<Btn3Down>,<Btn3Up>: diminfo_cur_mod4()" ));
 
-		sprintf( widget_name, "diminfo_max_%1d", i );
-		*(diminfo_max_widget+i) = XtVaCreateManagedWidget(
+		sprintf( widget_name, "diminfo_max_%1ld", ll );
+		*(diminfo_max_widget+ll) = XtVaCreateManagedWidget(
 			widget_name,
 			labelWidgetClass,
-			*(diminfo_row_widget+i),
+			*(diminfo_row_widget+ll),
 			XtNlabel, "Max:",
 			XtNwidth, app_data.dimlabel_width,
 			XtNborderWidth, 0,
 			NULL);
 
-		sprintf( widget_name, "diminfo_units_%1d", i );
-		*(diminfo_units_widget+i) = XtVaCreateManagedWidget(
+		sprintf( widget_name, "diminfo_units_%1ld", ll );
+		*(diminfo_units_widget+ll) = XtVaCreateManagedWidget(
 			widget_name,
 			labelWidgetClass,
-			*(diminfo_row_widget+i),
+			*(diminfo_row_widget+ll),
 			XtNlabel, "Units:",
 			XtNwidth, app_data.dimlabel_width,
 			XtNborderWidth, 0,
@@ -3579,17 +3254,6 @@ void x_set_cursor_normal()
 }
 
 /*************************************************************************************************/
-void new_cmaplist( Cmaplist **cml )
-{
-	(*cml) = (Cmaplist *)malloc( sizeof( Cmaplist ) );
-	(*cml)->color_list = (XColor *)malloc( (options.n_colors+N_EXTRA_COLORS)*sizeof(XColor) );
-	(*cml)->next       = NULL;
-	(*cml)->prev       = NULL;
-	(*cml)->name       = NULL;
-	(*cml)->pixel_transform = (ncv_pixel *)malloc( (options.n_colors+N_EXTRA_COLORS)*sizeof(ncv_pixel) );
-}
-
-/*************************************************************************************************/
 void x_set_windows_colormap_to_current( Widget w )
 {
 	XSetWindowColormap( XtDisplay(topLevel), XtWindow(w), current_colormap );
@@ -3681,8 +3345,10 @@ void 	varsel_menu_select(Widget w, XtPointer client_data, XtPointer call_data )
 {
 	NCVar 	*var;
 	int 	i, menu_item;
+	long	l_client_data;
 
-	menu_item = (int)client_data;
+	l_client_data = (long)client_data;
+	menu_item = (int)l_client_data;
 
 	var = variables;
 	for( i=0; i<menu_item; i++ )
@@ -3721,8 +3387,8 @@ void x_create_colorbar( float user_min, float user_max, int transform )
 	height = CBAR_HEIGHT;
 
 	if( options.debug ) fprintf( stderr, "x_create_colorbar: about to call cbar_make with width=%d height=%d n_extra_colors=%d user_min=%f user_max=%f transform=%d\n",
-		width, height, N_EXTRA_COLORS, user_min, user_max, transform );
-	cbar_make( width, height, N_EXTRA_COLORS, user_min, user_max, transform );
+		width, height, options.n_extra_colors, user_min, user_max, transform );
+	cbar_make( width, height, options.n_extra_colors, user_min, user_max, transform );
 	if( options.debug ) fprintf( stderr, "x_create_colorbar: exiting\n" );
 }
 
@@ -3771,7 +3437,7 @@ void x_draw_colorbar()
 		/* Convert data to TrueColor representation, with
 		 * the proper number of bytes per pixel
 		 */
-		make_tc_data( data, width, height, tc_data );
+		make_tc_data( data, width, height, current_colormap_list->color_list, tc_data );
 
 		ximage  = XCreateImage(
 			display,
@@ -3848,39 +3514,103 @@ void x_set_colormap_form_width( int width )
 	XtVaSetValues( colorbar_form_widget, XtNwidth, width, NULL );
 }
 
-#ifdef INC_PPM
+#ifdef HAVE_PNG
 /*************************************************************************************************/
-void dump_to_ppm( unsigned char *data, size_t width, size_t height, size_t frameno )
+void dump_to_png( unsigned char *data, size_t width, size_t height, size_t frameno )
 {
-	pixel   **temp_array, ppm_pixel;
-	pixval	r, g, b, max;
-	int	i, j, pix;
-	char	filename[2048];
-	FILE	*out_file;
+	char		filename[2048];
+	FILE		*out_file;
+	png_structp	png_ptr;
+	png_infop	info_ptr;
+	png_colorp	palette;
+	int		bit_depth, i, j, n_palette;
+	unsigned char	**row_pointers;
+	static int	error_state = 0;
 
-	sprintf( filename, "frame.%05ld.ppm", frameno );
+	if( error_state == 1 ) return;
+
+	sprintf( filename, "frame.%05ld.png", frameno );
 	frameno++;
 
-	if( (out_file = fopen( filename, "w" )) == NULL ) {
-		fprintf( stderr, "ncview: can't open file %s for writing\n", filename );
+	/* Open binary output file */
+	if( (out_file = fopen( filename, "wb" )) == NULL ) {
+		fprintf( stderr, "ncview: can't open PNG file %s for writing\n", filename );
+		error_state = 1;
 		return;
 		}
 
-	temp_array = ppm_allocarray(width, height );
-	for( j=0; j<height; j++ )
-	for( i=0; i<width;  i++ ) {
-		pix = *(data+i+j*width);
-		r = (pixval)((current_colormap_list->color_list+pix)->red >> 8);
-		g = (pixval)((current_colormap_list->color_list+pix)->green >> 8);
-		b = (pixval)((current_colormap_list->color_list+pix)->blue >> 8);
-		PPM_ASSIGN( ppm_pixel, r, g, b );
-		*(temp_array[j]+i) = ppm_pixel;
-		}	
+	/* Set up PNG information structures */
+	png_ptr = png_create_write_struct( PNG_LIBPNG_VER_STRING, (png_voidp)NULL, NULL, NULL );	/* use default error handlers */
+	if( ! png_ptr ) {
+		fprintf( stderr, "Error returned when trying to allocate PNG write structure\n" );
+		error_state = 1;
+		return;
+		}
+
+	info_ptr = png_create_info_struct( png_ptr );
+	if( ! info_ptr ) {
+		fprintf( stderr, "Error returned when trying to allocate PNG info structure\n" );
+		png_destroy_write_struct( &png_ptr, (png_infopp)NULL );
+		error_state = 1;
+		return;
+		}
+
+	/* Set up PNG I/O ops */
+	png_init_io( png_ptr, out_file );
 
-	max = PPM_MAXMAXVAL;
-	ppm_writeppm( out_file, temp_array, width, height, max, FALSE );
+	/* Describe our image for PNG */
+	bit_depth = 8;
+	png_set_IHDR( png_ptr, info_ptr, width, height, bit_depth, 
+		PNG_COLOR_TYPE_PALETTE,		/* ncview operates with palettes almost exclusively */
+		PNG_INTERLACE_NONE,
+		PNG_COMPRESSION_TYPE_DEFAULT,
+		PNG_FILTER_TYPE_DEFAULT );
+
+	/* Set our palette */
+	n_palette = 256;
+	palette = (png_colorp)malloc( sizeof(png_color) * n_palette );
+	if( palette == NULL ) {
+		fprintf( stderr, "Failed to allocate colormap; returning without writing output file\n" );
+		error_state = 1;
+		return;
+		}
+	for( i=0; i<n_palette; i++ ) {
+		palette[i].red   = ((current_colormap_list->color_list+i)->red   >> 8);
+		palette[i].green = ((current_colormap_list->color_list+i)->green >> 8);
+		palette[i].blue  = ((current_colormap_list->color_list+i)->blue  >> 8);
+		}
+	png_set_PLTE( png_ptr, info_ptr, palette, n_palette );
+
+	/* Make our row pointers */
+	row_pointers = (unsigned char **)malloc( sizeof( unsigned char * ) * height );
+	if( row_pointers == NULL ) {
+		fprintf( stderr, "Failed to allocate row pointers; returning without writing output file\n" );
+		error_state = 1;
+		return;
+		}
+	for( j=0; j<height; j++ ) 
+		row_pointers[j] = data + j*width;
+
+	/* Associate row pointers with the PNG structures */
+	png_set_rows( png_ptr, info_ptr, row_pointers );
+
+	/* Set up longjump target (PNG will use this for an error) */
+	if( setjmp( png_jmpbuf(png_ptr))) {
+		fprintf( stderr, "Error returned when trying to write PNG file, aborting operation\n" );
+		png_destroy_write_struct( &png_ptr, &info_ptr );
+		fclose( out_file );
+		error_state = 1;
+		return;
+		}
+
+	/* Write PNG data */
+	png_write_png( png_ptr, info_ptr, PNG_TRANSFORM_IDENTITY, NULL );
+
+	/* Delete allocated space */
+	free( row_pointers );
+	free( palette );
 
 	fclose(out_file);
-	ppm_freearray( temp_array, height );
 }
 #endif
+
diff --git a/src/interface/x_interface.dumpframes.c b/src/interface/x_interface.dumpframes.c
deleted file mode 100644
index 5e55871..0000000
--- a/src/interface/x_interface.dumpframes.c
+++ /dev/null
@@ -1,3280 +0,0 @@
-/*
- * Ncview by David W. Pierce.  A visual netCDF file viewer.
- * Copyright (C) 1993-2010 David W. Pierce
- *
- * This program  is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 3 as 
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License, version 3, for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * David W. Pierce
- * 6259 Caminito Carrena
- * San Diego, CA  92122
- * pierce at cirrus.ucsd.edu
- */
-
-/*****************************************************************************
- *
- *	Elements which implement the X Windows user interface to ncview
- *
- *****************************************************************************/
-
-#include "../ncview.includes.h"
-#include "../ncview.defines.h"
-#include "../ncview.protos.h"
-#include "../ncview.bitmaps.h"
-#include <X11/CoreP.h>
-
-#include "ppm.h"
-
-#define DEFAULT_BUTTON_WIDTH	55
-#define DEFAULT_LABEL_WIDTH	400
-#define DEFAULT_DIMLABEL_WIDTH	95
-#define DEFAULT_VARLABEL_WIDTH	95
-#define DEFAULT_N_VARS_PER_ROW	4
-#define DEFAULT_BLOWUP_SIZE	300
-#define N_EXTRA_COLORS		10
-
-#define XtNlabelWidth 		"labelWidth"
-#define XtCLabelWidth		"LabelWidth"
-#define XtNblowupDefaultSize 	"blowupDefaultSize"
-#define XtCBlowupDefaultSize	"BlowupDefaultSize"
-#define XtNdimLabelWidth 	"dimLabelWidth"
-#define XtCDimLabelWidth 	"DimLabelWidth"
-#define XtNvarLabelWidth 	"varLabelWidth"
-#define XtCVarLabelWidth 	"VarLabelWidth"
-#define XtNbuttonWidth 		"buttonWidth"
-#define XtCButtonWidth		"ButtonWidth"
-#define XtNnVarsPerRow		"nVarsPerRow"
-#define XtCNVarsPerRow		"NVarsPerRow"
-#define XtNdeltaStep		"deltaStep"
-#define XtCDeltaStep		"DeltaStep"
-#define XtNversion 		"version"
-#define XtCVersion		"Version"
-
-#define	ORDER_RGB	1 	/* R mask > B mask */
-#define	ORDER_BGR	2	/* B mask > R mask */
-
-/* This is used to hold key info about the X server
- * that we use when we try to create an image.
- */
-typedef struct {
-	int	bits_per_pixel, 
-		byte_order,
-		bytes_per_pixel, 
-		bitmap_unit,
-		bitmap_pad,
-		rgb_order,
-		shift_red,
-		shift_green_upper, shift_green_lower,
-		shift_blue,
-		depth;
-	unsigned long	mask_red,
-		mask_green_upper, mask_green_lower,
-		mask_blue;
-} Server_Info;
-
-/**************************/
-extern 	NCVar	  *variables;
-extern  Options	  options;
-extern  ncv_pixel *pixel_transform;
-/**************************/
-
-typedef struct {
-	int	label_width;		/* width of the informational labels */
-	int	dimlabel_width;		/* as above, but for dimension labls */
-	int	varlabel_width;		/* as above, but for variable labls */
-	int	blowup_default_size;	/* default size, in pixels, of newly opened windows */
-	int	button_width;		/* width of the control buttons */
-	int	n_vars_per_row;		/* how many vars in one row before
-					 * we start another.
-					 */
-	int	delta_step;		/* Becomes options.delta_step */
-	float	version;		/* Must match compiled in version */
-} AppData, *AppDataPtr;
-
-typedef struct {
-	XColor		*color_list;
-	void		*next, *prev;
-	char		*name;
-	ncv_pixel	*pixel_transform;
-} Cmaplist;
-
-/* These are "global" to this directory, in the sense that other files
- * in this directory use them.
- */
-Widget 		topLevel;
-XtAppContext 	x_app_context;
-
-static Cmaplist		*colormap_list   = NULL, *current_colormap_list = NULL;
-static Colormap		current_colormap = (Colormap)NULL;
-
-static AppData		app_data;
-static Server_Info	server;
-static XtIntervalId	timer;
-
-static int		timer_enabled      = FALSE,
-			ccontour_popped_up = FALSE,
-			valid_display;
-
-static float		default_version_number = 0.0;
-
-static Pixmap		reverse_pixmap,
-			backwards_pixmap,
-			pause_pixmap,
-			forward_pixmap,
-			fastforward_pixmap;
-
-static XEvent	event;
-
-static Widget
-	error_popup_widget = NULL,
-		error_popupcanvas_widget,
-			error_popupdialog_widget,
-	dimsel_popup_widget,
-		dimsel_popupcanvas_widget,
-			dimsel_ok_button_widget,
-			dimsel_cancel_button_widget,
-	ccontourpanel_widget,
-		ccontour_form_widget,
-			ccontour_info1_widget,
-                		ccontour_widget,
-			ccontour_info2_widget,
-	commandcanvas_widget,
-                buttonbox_widget,
-			label1_widget,
-			label2_widget,
-			label3_widget,
-			label4_widget,
-			label5_widget,
-                        quit_button_widget,
-			restart_button_widget,
-                        reverse_button_widget,
-                        backwards_button_widget,
-                        pause_button_widget,
-                        forward_button_widget,
-                        fastforward_button_widget,
-			edit_button_widget,
-			info_button_widget,
-			scrollspeed_label_widget,
-			scrollspeed_widget,
-			options_button_widget,
-		optionbox_widget,
-                        cmap_button_widget,
-                        invert_button_widget,
-                        invert_color_button_widget,
-                        blowup_widget,
-			transform_widget,
-			dimset_widget,
-			range_widget,
-			blowup_type_widget,
-			print_button_widget,
-		varsel_form_widget,
-			*var_selection_widget,	/* the boxes with N vars per box */
-			varlist_label_widget,
-			*varlist_widget,	/* The buttons that select a var */
-			varsel_menu_widget,	/* Only if using menu-style var selection */
-			var_menu,		/* ditto */
-		labels_row_widget,
-			lr_dim_widget,
-			lr_name_widget,
-			lr_min_widget,
-			lr_cur_widget,
-			lr_max_widget,
-			lr_units_widget,
-		*diminfo_row_widget = NULL,
-			*diminfo_dim_widget = NULL,
-			*diminfo_name_widget = NULL,
-			*diminfo_min_widget = NULL,
-			*diminfo_cur_widget = NULL,
-			*diminfo_max_widget = NULL,
-			*diminfo_units_widget = NULL,
-
-		xdim_selection_widget,
-			xdimlist_label_widget,
-			*xdimlist_widget = NULL,
-
-		ydim_selection_widget,
-			ydimlist_label_widget,
-			*ydimlist_widget = NULL;
-		
-static XtResource resources[] = {
-    {
-	XtNlabelWidth, 
-	XtCLabelWidth,
-	XtRInt,
-	sizeof( int ),
-	XtOffset( AppDataPtr, label_width ),
-	XtRImmediate,
-	(XtPointer)DEFAULT_LABEL_WIDTH,
-    },
-    {
-	XtNblowupDefaultSize, 
-	XtCBlowupDefaultSize,
-	XtRInt,
-	sizeof( int ),
-	XtOffset( AppDataPtr, blowup_default_size ),
-	XtRImmediate,
-	(XtPointer)DEFAULT_BLOWUP_SIZE,
-    },
-    {
-	XtNdimLabelWidth, 
-	XtCDimLabelWidth,
-	XtRInt,
-	sizeof( int ),
-	XtOffset( AppDataPtr, dimlabel_width ),
-	XtRImmediate,
-	(XtPointer)DEFAULT_DIMLABEL_WIDTH,
-    },
-    {
-	XtNvarLabelWidth, 
-	XtCVarLabelWidth,
-	XtRInt,
-	sizeof( int ),
-	XtOffset( AppDataPtr, varlabel_width ),
-	XtRImmediate,
-	(XtPointer)DEFAULT_VARLABEL_WIDTH,
-    },
-    {
-	XtNbuttonWidth, 
-	XtCButtonWidth,
-	XtRInt,
-	sizeof( int ),
-	XtOffset( AppDataPtr, button_width ),
-	XtRImmediate,
-	(XtPointer)DEFAULT_BUTTON_WIDTH,
-    },
-    {
-	XtNnVarsPerRow, 
-	XtCNVarsPerRow,
-	XtRInt,
-	sizeof( int ),
-	XtOffset( AppDataPtr, n_vars_per_row ),
-	XtRImmediate,
-	(XtPointer)DEFAULT_N_VARS_PER_ROW,
-    },
-    {
-	XtNdeltaStep,
-	XtCDeltaStep,
-	XtRInt,
-	sizeof( int ),
-	XtOffset( AppDataPtr, delta_step ),
-	XtRImmediate,
-	(XtPointer)DEFAULT_DELTA_STEP,	/* see file do_buttons.c for interpretation of this */
-    },
-    {
-	XtNversion,
-	XtCVersion,
-	XtRFloat,
-	sizeof( float ),
-	XtOffset( AppDataPtr, version ),
-	XtRFloat,
-	(XtPointer)&default_version_number
-    },
-};
-
-static int	error_popup_done    = FALSE, error_popup_result    = 0;
-static int	dimsel_popup_done   = FALSE, dimsel_popup_result   = 0;
-static Cursor	busy_cursor;
-
-/******************************************************************************
- * These are only used in this file
- */
-void 	new_cmaplist( Cmaplist **cml );
-unsigned char interp( int i, int range_i, unsigned char *mat, int n_entries );
-void	x_init_widgets		( Widget top );
-void	x_init_pixmaps		( Widget top );
-void 	create_pixmap 		( Widget shell_widget, Pixmap *pixmap, int id );
-void	x_set_lab     		( Widget w, char *s, int width );
-void 	x_add_to_cmap_list	( char *name, Colormap new_colormap );
-void	colormap_back		( Widget w, XButtonEvent *e, String *p, Cardinal *n );
-void 	x_make_dim_button_util  ( int dimension, Stringlist *dim_list, char *prefix, 
-					Widget **dimlist_widget, 
-					Widget parent_widget, 
-					char *selected_name );
-void	x_popup			( char *message );
-int	x_dialog                ( char *message, char *ret_string, int want_cancel_button );
-void	track_pointer		( void );
-
-/* the button callbacks and actions in x_interface.c */
-/* _mod1 is a standard callback; _mod2 is an accelerated action, and _mod3
- * is a backwards action */
-void 	print_button_callback(Widget w, XtPointer client_data, XtPointer call_data );
-void 	blowup_type_mod1(Widget w, XtPointer client_data, XtPointer call_data );
-void 	varsel_menu_select(Widget w, XtPointer client_data, XtPointer call_data );
-void 	range_mod1	(Widget w, XtPointer client_data, XtPointer call_data );
-void 	options_mod1	(Widget w, XtPointer client_data, XtPointer call_data);
-void 	range_mod3	(Widget w, XButtonEvent *e, String *p, Cardinal *n );
-void 	dimset_mod1	(Widget w, XtPointer client_data, XtPointer call_data );
-void 	quit_mod1	(Widget w, XtPointer client_data, XtPointer call_data );
-void 	cmap_mod1	(Widget w, XtPointer client_data, XtPointer call_data );
-void 	cmap_mod3	(Widget w, XButtonEvent *e, String *p, Cardinal *n );
-void 	restart_mod1	(Widget w, XtPointer client_data, XtPointer call_data );
-void 	reverse_mod1	(Widget w, XtPointer client_data, XtPointer call_data );
-void 	reverse_mod2   	(Widget w, XButtonEvent *e, String *p, Cardinal *n );
-void 	back_mod1	(Widget w, XtPointer client_data, XtPointer call_data );
-void 	back_mod2    	(Widget w, XButtonEvent *e, String *p, Cardinal *n );
-void 	pause_mod1	(Widget w, XtPointer client_data, XtPointer call_data );
-void 	forward_mod1	(Widget w, XtPointer client_data, XtPointer call_data );
-void 	forward_mod2 	(Widget w, XButtonEvent *e, String *p, Cardinal *n );
-void 	ff_mod1		(Widget w, XtPointer client_data, XtPointer call_data );
-void 	edit_mod1	(Widget w, XtPointer client_data, XtPointer call_data );
-void 	info_mod1	(Widget w, XtPointer client_data, XtPointer call_data );
-void 	fastforward_mod2 (Widget w, XButtonEvent *e, String *p, Cardinal *n );
-void 	invert_mod1	(Widget w, XtPointer client_data, XtPointer call_data );
-void 	invert_color_mod1 (Widget w, XtPointer client_data, XtPointer call_data );
-void 	blowup_mod1	(Widget w, XtPointer client_data, XtPointer call_data );
-void 	blowup_mod2	(Widget w, XButtonEvent *e, String *p, Cardinal *n );
-void 	blowup_mod3	(Widget w, XButtonEvent *e, String *p, Cardinal *n );
-void 	blowup_mod4	(Widget w, XButtonEvent *e, String *p, Cardinal *n );
-void 	varlist_mod1	(Widget w, XtPointer client_data, XtPointer call_data );
-void 	xdimlist_mod1	(Widget w, XtPointer client_data, XtPointer call_data );
-void 	ydimlist_mod1	(Widget w, XtPointer client_data, XtPointer call_data );
-void 	transform_mod1	(Widget w, XtPointer client_data, XtPointer call_data );
-void 	dimsel_callback	(Widget w, XtPointer client_data, XtPointer call_data );
-void 	error_popup_callback(Widget w, XtPointer client_data, XtPointer call_data );
-void 	diminfo_cur_mod1(Widget w, XtPointer client_data, XtPointer call_data);
-void 	diminfo_cur_mod2(Widget w, XButtonEvent *e, String *p, Cardinal *n );
-void 	diminfo_cur_mod3(Widget w, XButtonEvent *e, String *p, Cardinal *n );
-void 	diminfo_cur_mod4(Widget w, XButtonEvent *e, String *p, Cardinal *n );
-void 	diminfo_min_mod1(Widget w, XtPointer client_data, XtPointer call_data);
-void 	do_plot_xy	(Widget w, XButtonEvent *e, String *p, Cardinal *n );
-void 	do_set_dataedit_place  (Widget w, XButtonEvent *e, String *p, Cardinal *n );
-void 	do_set_min_from_curdata(Widget w, XButtonEvent *e, String *p, Cardinal *n );
-void 	do_set_max_from_curdata(Widget w, XButtonEvent *e, String *p, Cardinal *n );
-void 	expose_ccontour();
-
-void 	testf(Widget w, XButtonEvent *e, String *p, Cardinal *n );
-
-static void 	add_callbacks( void );
-static void 	make_tc_data( unsigned char *data, long width, long height, 
-		unsigned char *tc_data );
-static void 	make_tc_data_24( unsigned char *data, long width, long height, 
-		unsigned char *tc_data );
-static void 	make_tc_data_16( unsigned char *data, long width, long height, 
-		unsigned char *tc_data );
-static void 	make_tc_data_32( unsigned char *data, long width, long height, 
-		unsigned char *tc_data );
-static void 	dump_to_ppm( unsigned char *data, size_t width, size_t height );
-
-/*************************************************************************/
-
-	void
-x_parse_args( int *p_argc, char **argv )
-{
-	Visual	*visual;
-	char	program_title[132];
-	static XImage	*ximage;
-	long	data;
-
-	topLevel =  XtVaAppInitialize(
-		&x_app_context,	 /* Application context           */
-		"Ncview",	 /* Application class             */
-		NULL, 0,	 /* command line option list      */
-		p_argc, argv,	 /* command line args             */
-		NULL,		 /* for missing app-defaults file */
-		NULL );		 /* terminate varargs list        */
-	
-	sprintf( program_title, "Ncview %.2f\n", PROGRAM_VERSION );
-	XtVaSetValues( topLevel, XtNtitle, program_title, NULL );
-
-	/* Have to determine the visual class as soon as possible!
-	 * In particular, must be done BEFORE x_initialize, because
-	 * the colormap initialization is called before x_initialize,
-	 * and we have to know the display class to init the colormaps.
-	 */
-	visual = XDefaultVisualOfScreen( XtScreen( topLevel ) );
-	switch ( visual->class ) {
-		case PseudoColor:	
-			options.display_type = PseudoColor;
-			valid_display = TRUE;
-			break;
-
-		case TrueColor:
-			options.display_type = TrueColor;
-			valid_display = TRUE;
-			break;
-
-		case StaticColor:
-			fprintf( stderr, "Sorry, StaticColor displays ");
-			fprintf( stderr, "are not supported.\n" );
-			options.display_type = StaticColor;
-			valid_display = FALSE;
-			break;
-
-		case DirectColor:
-			fprintf( stderr, "Sorry, DirectColor displays ");
-			fprintf( stderr, "are not supported.\n" );
-			valid_display = FALSE;
-			break;
-
-		case GrayScale:
-			fprintf( stderr, "Sorry, GrayScale displays ");
-			fprintf( stderr, "are not supported.\n" );
-			valid_display = FALSE;
-			break;
-
-		case StaticGray:
-			fprintf( stderr, "Sorry, StaticGray displays ");
-			fprintf( stderr, "are not supported.\n" );
-			valid_display = FALSE;
-			break;
-		
-		default:
-			fprintf( stderr, "ERROR!! Unknown visual class %d!!\n",
-				visual->class );
-			exit( -1 );
-		}
-
-	/* Make a test image to get our server parameters
-	*/
-	data = 0;       /* fake test data */
-	if( options.display_type == TrueColor ) {
-		ximage  = XCreateImage(
-			XtDisplay( topLevel ),
-			XDefaultVisualOfScreen( XtScreen(topLevel) ),
-			XDefaultDepthOfScreen ( XtScreen(topLevel) ),
-			ZPixmap,
-			0,
-			(char *)data, 
-			1, 1, 32, 0 );
-		}
-	else /* display_type == PseudoColor */
-		{
-		ximage  = XCreateImage(
-			XtDisplay( topLevel ),
-			XDefaultVisualOfScreen( XtScreen(topLevel) ),
-			XDefaultDepthOfScreen ( XtScreen(topLevel) ),
-			ZPixmap,
-			0,
-			(char *)data,
-			1, 1, 8, 0 );
-		}
-
-	if( options.debug ) {
-		printf( "byte order: %s\n", 
-			(ximage->byte_order == LSBFirst) ? "LSBFirst" : "MSBFirst" );
-		printf( "bitmap unit: %d\n", ximage->bitmap_unit );
-		printf( "bit order: %s\n", 
-			(ximage->bitmap_bit_order == LSBFirst) ? "LSBFirst" : "MSBFirst" );
-		printf( "bitmap pad: %d\n", ximage->bitmap_pad );
-		printf( "depth: %d\n", ximage->depth );
-		printf( "bytes per line: %d\n", ximage->bytes_per_line );
-		printf( "bits per pixel: %d\n", ximage->bits_per_pixel );
-		printf( "r, g, b masks: %0lx, %0lx, %0lx\n", ximage->red_mask,
-				ximage->green_mask, ximage->blue_mask );
-		}
-
-	server.byte_order	= ximage->byte_order;
-	server.bits_per_pixel  	= ximage->bits_per_pixel;
-	server.bytes_per_pixel 	= server.bits_per_pixel/8;
-	server.bitmap_unit     	= ximage->bitmap_unit;
-	server.bitmap_pad      	= ximage->bitmap_pad;
-	server.depth           	= ximage->depth;
-	if( server.byte_order == MSBFirst ) {
-		if( ximage->red_mask > ximage->blue_mask )
-			server.rgb_order = ORDER_BGR;
-		else
-			server.rgb_order = ORDER_RGB;
-		}
-	else
-		{
-		if( ximage->red_mask > ximage->blue_mask )
-			server.rgb_order = ORDER_RGB;
-		else
-			server.rgb_order = ORDER_BGR;
-		}
-
-	/* These are for 16-bit displays.  These numbers are surely
-	 * wrong for other displays than the one 16-bit display I
-	 * had to test them on, which was an Intel Linux box.
-	 */
-	server.shift_blue = 11;
-	server.shift_red  = 8;
-	server.shift_green_upper = 13;
-	server.shift_green_lower = 5;
-
-	server.mask_red = 0x00f8;
-	server.mask_green_upper = 0x0007; /* goes with red */
-	server.mask_green_lower = 0x00e0; /* goes with blue */
-	server.mask_blue = 0x001f;
-}
-
-	void
-x_initialize()
-{
-	void	  check_app_res();
-	void 	  track_pointer();
-
-	static XtActionsRec new_actions[] = {
-		{"cmap_mod3",    	(XtActionProc)cmap_mod3        	},
-/*		{"redraw_ccontour",  	(XtActionProc)redraw_ccontour  	}, */
-		{"reverse_mod2",     	(XtActionProc)reverse_mod2     	},
-		{"back_mod2",     	(XtActionProc)back_mod2        	},
-		{"forward_mod2",	(XtActionProc)forward_mod2	},
-		{"fastforward_mod2",	(XtActionProc)fastforward_mod2	},
-		{"diminfo_cur_mod2",	(XtActionProc)diminfo_cur_mod2  },
-		{"diminfo_cur_mod3",	(XtActionProc)diminfo_cur_mod3  },
-		{"diminfo_cur_mod4",	(XtActionProc)diminfo_cur_mod4  },
-		{"range_mod3",		(XtActionProc)range_mod3	},
-		{"blowup_mod2",		(XtActionProc)blowup_mod2	},
-		{"blowup_mod3",		(XtActionProc)blowup_mod3	},
-		{"blowup_mod4",		(XtActionProc)blowup_mod4	},
-		{"do_plot_xy",		(XtActionProc)do_plot_xy	},
-		{"testf",		(XtActionProc)testf		},
-		{"do_set_dataedit_place",  (XtActionProc)do_set_dataedit_place   },
-		{"do_set_min_from_curdata",(XtActionProc)do_set_min_from_curdata },
-		{"do_set_max_from_curdata",(XtActionProc)do_set_max_from_curdata },
-	};
-
-	XtVaGetApplicationResources( topLevel,
-		&app_data,
-		resources,
-		XtNumber(resources),
-		NULL );
-	check_app_res( &app_data );
-	/* This shouldn't be in this file, really, but X can get it from
-	 * the resource file, and there is no point in having ncview read
-	 * in two different configuration files.
-	 */
-	options.delta_step          = app_data.delta_step;
-	options.blowup_default_size = app_data.blowup_default_size;
-
-	XtAppAddActions( x_app_context, new_actions, XtNumber( new_actions ));
-	x_init_pixmaps( topLevel );
-	x_init_widgets( topLevel );
-	add_callbacks ();
-
-	x_range_init();
-	x_plot_range_init();
-
-	XtRealizeWidget( topLevel );
-
-	busy_cursor = XCreateFontCursor( 
-		XtDisplay( commandcanvas_widget ), XC_watch );
-	if( busy_cursor == BadValue )
-		busy_cursor = (Cursor)NULL;
-
-	
-	if( options.display_type == PseudoColor ) {
-		XSetWindowColormap( XtDisplay(topLevel), XtWindow(topLevel), 
-				current_colormap );
-		}
-
-	/* Add the event handler which tracks the cursor in
-	 * the data window.
-	 */
-	XtAddEventHandler( ccontour_widget, 
-		PointerMotionMask | ButtonPressMask,
-		False,
-		track_pointer,
-		NULL );
-
-	plot_xy_init();
-
-	x_display_info_init();
-
-	set_options_init();
-}
-
-	void
-x_query_pointer_position( int *ret_x, int *ret_y )
-{
-	Window root_return, child_window_return;
-	int	root_x, root_y, win_x, win_y;
-	unsigned int keys_and_buttons;
-
-	if( XQueryPointer( XtDisplay(topLevel),
-			XtWindow( ccontour_widget ),
-			&root_return,
-			&child_window_return,
-			&root_x,
-			&root_y,
-			&win_x,
-			&win_y,
-			&keys_and_buttons ) ) {
-		*ret_x = win_x;
-		*ret_y = win_y;
-		}
-	else
-		{
-		*ret_x = -1;
-		*ret_y = -1;
-		}
-}
-
-	void
-track_pointer()
-{
-	Window root_return, child_window_return;
-	int	root_x, root_y, win_x, win_y;
-	unsigned int keys_and_buttons;
-
-	if( XQueryPointer( XtDisplay(topLevel),
-			XtWindow( ccontour_widget ),
-			&root_return,
-			&child_window_return,
-			&root_x,
-			&root_y,
-			&win_x,
-			&win_y,
-			&keys_and_buttons ) )
-		report_position( win_x, win_y, keys_and_buttons );
-}
-
-
-	void
-x_init_widgets_ccontourpanel( Widget top )
-{
-	if( options.display_type == PseudoColor ) {
-		ccontourpanel_widget = XtVaCreatePopupShell(
-			options.window_title,
-			transientShellWidgetClass,
-			top,
-			XtNcolormap, current_colormap,
-			NULL );
-
-		ccontour_form_widget = XtVaCreateManagedWidget(
-			"ccontourform",
-			boxWidgetClass,
-			ccontourpanel_widget,
-			XtNorientation, XtorientVertical,
-			XtNhSpace, 0,
-			XtNvSpace, 0,
-			XtNcolormap, current_colormap,
-			NULL);
-		}
-	else
-		{
-		ccontourpanel_widget = XtVaCreatePopupShell(
-			options.window_title,
-			transientShellWidgetClass,
-			top,
-			NULL );
-
-		ccontour_form_widget = XtVaCreateManagedWidget(
-			"ccontourform",
-			boxWidgetClass,
-			ccontourpanel_widget,
-			XtNorientation, XtorientVertical,
-			XtNhSpace, 0,
-			XtNvSpace, 0,
-			NULL);
-		}
-
-		if( options.want_extra_info )
-			ccontour_info1_widget = XtVaCreateManagedWidget(
-				"ccontourinfo1",
-				labelWidgetClass,
-				ccontour_form_widget,
-				XtNlabel, "no variable selected - 1",
-				XtNborderWidth, 0,
-				XtNwidth, 300,
-				NULL );
-
-		ccontour_widget = XtVaCreateManagedWidget(
-			"ccontour",
-			simpleWidgetClass,
-			ccontour_form_widget,
-/* cursorName is only present in R5 release */
-#ifdef XtNcursorName
-/*			XtNcursorName, "dotbox", */
-#endif
-			XtNwidth,  24,
-			XtNheight, 24,
-/*			XtNdepth,  server.depth, */
-			NULL);
-
-		ccontour_widget->core.widget_class->core_class.compress_exposure = TRUE;
-		XtAddEventHandler( ccontour_widget, ExposureMask, FALSE,
-			(XtEventHandler)expose_ccontour, NULL );
-
-		if( options.want_extra_info )
-			ccontour_info2_widget = XtVaCreateManagedWidget(
-				"ccontourinfo2",
-				labelWidgetClass,
-				ccontour_form_widget,
-				XtNlabel, "no variable selected - 2",
-				XtNwidth, 300,
-				XtNfromVert, ccontour_widget,
-				XtNborderWidth, 0,
-				NULL );
-}
-
-	void
-x_init_widgets_labels( Widget parent )
-{
-	/* Title */
-	label1_widget = XtVaCreateManagedWidget(
-		"label1",
-		labelWidgetClass,
-		parent,
-		XtNlabel, "no variable selected",
-		XtNwidth, app_data.label_width,
-		NULL );
-
-	/* Variable name */
-	label2_widget = XtVaCreateManagedWidget(
-		"label2",
-		labelWidgetClass,
-		parent,
-		XtNlabel, PROGRAM_ID,
-		XtNwidth, app_data.label_width,
-		XtNfromVert, label1_widget,
-		NULL);
-
-	/* Frame number */
-	label3_widget = XtVaCreateManagedWidget(
-		"label3",
-		labelWidgetClass,
-		parent,
-		XtNwidth, app_data.label_width,
-		XtNfromVert, label2_widget,
-		XtNlabel, "*** SELECT A VARIABLE TO START ***",
-		NULL);
-
-	/* Displayed range */
-	label4_widget = XtVaCreateManagedWidget(
-		"label4",
-		labelWidgetClass,
-		parent,
-		XtNlabel, "",
-		XtNfromVert, label3_widget,
-		XtNwidth, app_data.label_width,
-		NULL);
-
-	/* Current location and value */
-	label5_widget = XtVaCreateManagedWidget(
-		"label5",
-		labelWidgetClass,
-		parent,
-		XtNlabel, "",
-		XtNfromVert, label4_widget,
-		XtNwidth, app_data.label_width,
-		NULL);
-}
-
-	void
-x_init_widgets_buttonbox( Widget parent )
-{
-	buttonbox_widget = XtVaCreateManagedWidget(
-		"buttonbox",
-		boxWidgetClass,
-		parent,
-		XtNorientation, XtorientHorizontal,
-		XtNfromVert, label5_widget,
-		NULL);
-
-	quit_button_widget = XtVaCreateManagedWidget(
-		"quit",
-		commandWidgetClass,
-		buttonbox_widget,
-		XtNheight, 24,
-		XtNwidth, app_data.button_width,
-		NULL);
-
-	restart_button_widget = XtVaCreateManagedWidget(
-		"restart",
-		commandWidgetClass,
-		buttonbox_widget,
-		XtNheight, 24,
-		XtNsensitive, False,
-		XtNlabel, "->1",
-		XtNwidth, app_data.button_width,
-		NULL);
-
-	reverse_button_widget = XtVaCreateManagedWidget(
-		"reverse",
-		toggleWidgetClass,
-		buttonbox_widget,
-		XtNbitmap, reverse_pixmap,
-		XtNsensitive, False,
-		NULL);
-
-	backwards_button_widget = XtVaCreateManagedWidget(
-		"back",
-		commandWidgetClass,
-		buttonbox_widget,
-		XtNbitmap, backwards_pixmap,
-		XtNsensitive, False,
-		NULL);
-
-	pause_button_widget = XtVaCreateManagedWidget(
-		"pause",
-		toggleWidgetClass,
-		buttonbox_widget,
-		XtNbitmap, pause_pixmap,
-		XtNradioGroup, reverse_button_widget,
-		XtNstate, True,
-		XtNsensitive, False,
-		NULL);
-
-	forward_button_widget = XtVaCreateManagedWidget(
-		"forward",
-		commandWidgetClass,
-		buttonbox_widget,
-		XtNbitmap, forward_pixmap,
-		XtNradioGroup, reverse_button_widget,
-		XtNsensitive, False,
-		NULL);
-
-	fastforward_button_widget = XtVaCreateManagedWidget(
-		"fastforward",
-		toggleWidgetClass,
-		buttonbox_widget,
-		XtNbitmap, fastforward_pixmap,
-		XtNradioGroup, reverse_button_widget,
-		XtNsensitive, False,
-		NULL);
-
-	edit_button_widget = XtVaCreateManagedWidget(
-		"Edit",
-		commandWidgetClass,
-		buttonbox_widget,
-		XtNheight, 24,
-		XtNsensitive, False,
-		NULL);
-
-	info_button_widget = XtVaCreateManagedWidget(
-		"?",
-		commandWidgetClass,
-		buttonbox_widget,
-		XtNheight, 24,
-		XtNsensitive, False,
-		NULL);
-
-	scrollspeed_label_widget = XtVaCreateManagedWidget(
-		"Delay:",
-		commandWidgetClass,
-		buttonbox_widget,
-		XtNheight, 24,
-		XtNwidth, app_data.button_width,
-		XtNborderWidth, 0,
-		NULL);
-
-	scrollspeed_widget = XtVaCreateManagedWidget(
-		"scrollspeed",
-		scrollbarWidgetClass,
-		buttonbox_widget,
-		XtNorientation, XtorientHorizontal,
-		/* XtNshown, 0.1, */
-		XtNthumb, None,
-		XtNlength, 75,
-		XtNthickness, 24,
-		NULL);
-
-	options_button_widget = XtVaCreateManagedWidget(
-		"Opts",
-		commandWidgetClass,
-		buttonbox_widget,
-		XtNheight, 24,
-		XtNsensitive, True,
-		NULL);
-}
-
-	void
-x_init_widgets_optionbox( Widget parent )
-{
-	optionbox_widget = XtVaCreateManagedWidget(
-		"optionbox",
-		boxWidgetClass,
-		parent,
-		XtNorientation, XtorientHorizontal,
-		XtNfromVert, buttonbox_widget,
-		NULL);
-
-	cmap_button_widget = XtVaCreateManagedWidget(
-		"cmap",
-		commandWidgetClass,
-		optionbox_widget,
-		XtNlabel, current_colormap_list->name,
-		XtNsensitive, False,
-		XtNwidth, app_data.button_width,
-		NULL);
-
-	invert_button_widget = XtVaCreateManagedWidget(
-		"Inv P",
-		toggleWidgetClass,
-		optionbox_widget,
-		XtNsensitive, False,
-		XtNwidth, app_data.button_width,
-		NULL);
-
-	invert_color_button_widget = XtVaCreateManagedWidget(
-		"Inv C",
-		toggleWidgetClass,
-		optionbox_widget,
-		XtNsensitive, False,
-		XtNwidth, app_data.button_width,
-		NULL);
-
-	blowup_widget = XtVaCreateManagedWidget(
-		"blowup",
-		commandWidgetClass,
-		optionbox_widget,
-		XtNsensitive, False,
-		XtNwidth, app_data.button_width,
-		XtNlabel, "Mag X1",
-		NULL);
-
-	transform_widget = XtVaCreateManagedWidget(
-		"transform",
-		commandWidgetClass,
-		optionbox_widget,
-		XtNsensitive, True,
-		XtNlabel, "Linear",
-		XtNwidth, app_data.button_width,
-		XtNsensitive, False,
-		NULL);
-
-	dimset_widget = XtVaCreateManagedWidget(
-		"dimset",
-		commandWidgetClass,
-		optionbox_widget,
-		XtNsensitive, False,
-		XtNlabel, "Axes",
-		XtNwidth, app_data.button_width,
-		NULL);
-
-	range_widget = XtVaCreateManagedWidget(
-		"Range",
-		commandWidgetClass,
-		optionbox_widget,
-		XtNsensitive, False,
-		XtNwidth, app_data.button_width,
-		NULL);
-
-	blowup_type_widget = XtVaCreateManagedWidget(
-		"blowup_type",
-		commandWidgetClass,
-		optionbox_widget,
-		XtNsensitive, False,
-		XtNwidth, app_data.button_width,
-		NULL);
-
-	print_button_widget = XtVaCreateManagedWidget(
-		"Print",
-		commandWidgetClass,
-		optionbox_widget,
-		XtNsensitive, False,
-		XtNwidth, app_data.button_width,
-		NULL);
-}
-
-	void
-x_init_widgets_varsel_menu( Widget parent )
-{
-	int	i, n_vars;
-	NCVar	*var;
-	char	widget_name[128];
-	Widget	entry;
-
-	varsel_menu_widget = XtVaCreateManagedWidget(
-		"Var to display",
-		menuButtonWidgetClass,
-		parent,
-		XtNmenuName, "var_menu",
-		NULL );
-
-	var_menu = XtVaCreatePopupShell( 
-		"var_menu", 
-		simpleMenuWidgetClass,
-		varsel_menu_widget,
-		NULL );
-
-	n_vars = n_vars_in_list( variables );
-	var       = variables;
-	for( i=0; i<n_vars; i++ ) {
-		sprintf( widget_name, "%s", var->name );
-		entry = XtVaCreateManagedWidget(
-			widget_name,
-			smeBSBObjectClass,
-			var_menu,
-			NULL );
-		XtAddCallback( entry, XtNcallback, varsel_menu_select, (XtPointer)i );
-		var = var->next;
-		}
-}
-
-	void
-x_init_widgets_varsel_list( Widget parent )
-{
-	int	n_vars, n_varsel_boxes, which_box, i, state;
-	NCVar	*var;
-	char	widget_name[128];
-	Widget	w;
-
-	/* Arrange the variables in boxes, n_vars_per_row variables to a box */
-	n_vars               = n_vars_in_list( variables );
-	n_varsel_boxes       = n_vars / app_data.n_vars_per_row + 5;
-	var_selection_widget = (Widget *)malloc( n_varsel_boxes*sizeof( Widget ));
-
-	/* Make an array of widgets for the variables; indicate the end of the 
-	 * array by a NULL value.
-	 */
-	varlist_widget = (Widget *)malloc( (n_vars+1)*sizeof(Widget));
-	if( varlist_widget == NULL ) {
-		fprintf( stderr, "ncview: x_init_widgets: malloc ");
-		fprintf( stderr, "failed on varlist_widget initializeation\n" );
-		exit( -1 );
-		}
-	*(varlist_widget+n_vars) = NULL;
-
-	var       = variables;
-	which_box = 0;
-	for( i=0; i<n_vars; i++ ) {
-		if( var == NULL ) 
-			{
-			fprintf( stderr, "ncview: x_init_widgets: internal ");
-			fprintf( stderr, "inconsistancy -- empty variable list\n" );
-			exit( -1 );
-			}
-		if( i == 0 ) {
-			/* The very first button box! */
-			sprintf( widget_name, "varselbox_%1d", which_box+1 );
-			*(var_selection_widget+which_box) = XtVaCreateManagedWidget(
-				widget_name,
-				boxWidgetClass,
-				parent,
-				XtNorientation, XtorientHorizontal,
-				XtNborderWidth, 0,
-				NULL);
-			sprintf( widget_name, "varlist_label_%1d", which_box+1 );
-			varlist_label_widget = XtVaCreateManagedWidget(
-				widget_name,
-				labelWidgetClass,
-				*(var_selection_widget+which_box),
-				XtNwidth, app_data.button_width,
-				XtNlabel, "Var:",
-				XtNborderWidth, 0,
-				NULL );
-			which_box++;
-			}
-		else if( (i % app_data.n_vars_per_row) == 0 ) {
-			/* A new button box! */
-			sprintf( widget_name, "box_%1d", which_box+1 );
-			*(var_selection_widget+which_box) = XtVaCreateManagedWidget(
-				widget_name,
-				boxWidgetClass,
-				parent,
-				XtNorientation, XtorientHorizontal,
-				XtNborderWidth, 0,
-				XtNfromVert, *(var_selection_widget + which_box - 1),
-				NULL);
-			sprintf( widget_name, "varlist_label_%1d", which_box+1 );
-			varlist_label_widget = XtVaCreateManagedWidget(
-				widget_name,
-				labelWidgetClass,
-				*(var_selection_widget+which_box),
-				XtNwidth, app_data.button_width,
-				XtNborderWidth, 0,
-				XtNlabel, "",
-				NULL );
-			which_box++;
-			}
-
-		sprintf( widget_name, "varsel_%s", var->name );
-		state = False;
-		if( i == 0 )  /* first variable button */
-			*(varlist_widget+i) = XtVaCreateManagedWidget(
-				widget_name,
-				toggleWidgetClass,
-				*(var_selection_widget+which_box-1),
-				XtNstate, state,
-				XtNlabel, var->name,
-				XtNsensitive, True,
-				XtNwidth, app_data.varlabel_width,
-				NULL );
-		else
-			*(varlist_widget+i) = XtVaCreateManagedWidget(
-				widget_name,
-				toggleWidgetClass,
-				*(var_selection_widget+which_box-1),
-				XtNradioGroup, *varlist_widget,
-				XtNstate, state,
-				XtNlabel, var->name,
-				XtNsensitive, True,
-				XtNwidth, app_data.varlabel_width,
-				NULL );
-		var = var->next;
-		}
-
-	/* In the degenerate case of only one variable, must make it a radio
-	 * group by itself; can't do it above, because it needs to know its
-	 * own widget number before it can be done.
-	 */
-	if( n_vars == 1 )
-		XtVaSetValues( *varlist_widget, XtNradioGroup, 
-				*varlist_widget, NULL );
-
-	i = 0;
-	while( (w = *(varlist_widget + i++)) != NULL )
-		XtAddCallback( w, XtNcallback, varlist_mod1, NULL );
-}
-
-	void
-x_init_widgets_varsel( Widget parent )
-{
-	if( options.varsel_style == VARSEL_LIST )
-		x_init_widgets_varsel_list( parent );
-	else
-		x_init_widgets_varsel_menu( parent );
-}
-
-	void
-x_init_widgets_dimlabels( Widget parent )
-{
-	labels_row_widget = XtVaCreateManagedWidget(
-		"label_row",
-		boxWidgetClass,
-		commandcanvas_widget,
-		XtNfromVert, varsel_form_widget,
-		XtNorientation, XtorientHorizontal,
-		NULL);
-
-	lr_dim_widget = XtVaCreateManagedWidget(
-		"label_dimension",
-		labelWidgetClass,
-		labels_row_widget,
-		XtNlabel, "Dim:",
-		XtNjustify, XtJustifyRight,
-		XtNwidth, 50,
-		NULL);
-
-	lr_name_widget = XtVaCreateManagedWidget(
-		"label_name",
-		labelWidgetClass,
-		labels_row_widget,
-		XtNlabel, "Name:",
-		XtNwidth, app_data.dimlabel_width,
-		NULL);
-
-	lr_min_widget = XtVaCreateManagedWidget(
-		"label_min",
-		labelWidgetClass,
-		labels_row_widget,
-		XtNlabel, "Min:",
-		XtNwidth, app_data.dimlabel_width,
-		NULL);
-
-	lr_cur_widget = XtVaCreateManagedWidget(
-		"label_cur",
-		labelWidgetClass,
-		labels_row_widget,
-		XtNlabel, "Current:",
-		XtNwidth, app_data.dimlabel_width,
-		NULL);
-
-	lr_max_widget = XtVaCreateManagedWidget(
-		"label_max",
-		labelWidgetClass,
-		labels_row_widget,
-		XtNlabel, "Max:",
-		XtNwidth, app_data.dimlabel_width,
-		NULL);
-
-	lr_units_widget = XtVaCreateManagedWidget(
-		"label_units",
-		labelWidgetClass,
-		labels_row_widget,
-		XtNlabel, "Units:",
-		XtNwidth, app_data.dimlabel_width,
-		NULL);
-}
-
-	void
-x_init_widgets( Widget top )
-{
-	int	buttonbox_width, n_dims;
-	int	max_dims;
-	Stringlist *dim_list, *max_dim_list;
-	NCVar	*var;
-
-	x_init_widgets_ccontourpanel( top );
-
-	if( options.display_type == PseudoColor )
-		commandcanvas_widget = XtVaCreateManagedWidget(
-			"commandcanvas",
-			formWidgetClass,
-			top,
-			XtNcolormap, current_colormap,
-			NULL);
-	else
-		commandcanvas_widget = XtVaCreateManagedWidget(
-			"commandcanvas",
-			formWidgetClass,
-			top,
-			NULL);
-
-	/* The labels that hold name of displayed variable, the
-	 * variable's range, current location and value, and
-	 * the displayed frame number.
-	 */
-	x_init_widgets_labels( commandcanvas_widget );
-
-	/* First row of buttons, including "Quit" and the
-	 * tape-recorder style movement buttons
-	 */
-	x_init_widgets_buttonbox( commandcanvas_widget );
-
-	/* Second row of options buttons, including colormap selection,
-	 * whether or not to invert, mag, transformation, axes,
-	 * range, interpolation, and printing
-	 */
-	x_init_widgets_optionbox( commandcanvas_widget );
-
-	XtVaGetValues( buttonbox_widget, XtNwidth, &buttonbox_width, NULL );
-
-	varsel_form_widget = XtVaCreateManagedWidget(
-		"varselectform",
-		formWidgetClass,
-		commandcanvas_widget,
-		XtNfromVert, optionbox_widget,
-		NULL);
-
-	/* the widgets that allow the user to select the variable to display */
-	x_init_widgets_varsel( varsel_form_widget );
-
-	/* Description lables for the following dimension entries */
-	x_init_widgets_dimlabels( commandcanvas_widget );
-
-	/* Construct an aggregate list which has the most possible scannable
-	 * dimensions for all variables in the file.
-	 */
-	max_dims = -1;
-	var      = variables;
-	while( var != NULL ) {
-		dim_list = fi_scannable_dims( var->first_file->id, var->name );
-		n_dims   = n_strings_in_list( dim_list );
-		if( n_dims > max_dims ) {
-			max_dims     = n_dims;
-			max_dim_list = dim_list;
-			}
-		var = var->next;
-		}
-	x_init_dim_info( max_dim_list );
-}	
-
-	void
-x_init_pixmaps( Widget top )
-{
-        create_pixmap( top, &reverse_pixmap,     BUTTON_REWIND      );
-	create_pixmap( top, &backwards_pixmap,   BUTTON_BACKWARDS   );
-	create_pixmap( top, &pause_pixmap,       BUTTON_PAUSE       );
-	create_pixmap( top, &forward_pixmap,     BUTTON_FORWARD     );
-	create_pixmap( top, &fastforward_pixmap, BUTTON_FASTFORWARD );
-}	
-
-	void
-create_pixmap( Widget shell_widget, Pixmap *pixmap, int id )
-{
-	switch( id ) {
-		
-		case BUTTON_REWIND:
-        		*pixmap = XCreateBitmapFromData( XtDisplay(shell_widget),
-				RootWindowOfScreen(XtScreen(shell_widget)),
-				(char *)reversebitmap_bits,
-				reversebitmap_width,
-				reversebitmap_height );
-			break;
-
-		case BUTTON_BACKWARDS:
-        		*pixmap = XCreateBitmapFromData( XtDisplay(shell_widget),
-				RootWindowOfScreen(XtScreen(shell_widget)),
-				(char *)backbitmap_bits,
-				backbitmap_width,
-				backbitmap_height );
-			break;
-
-		case BUTTON_PAUSE:
-        		*pixmap = XCreateBitmapFromData( XtDisplay(shell_widget),
-				RootWindowOfScreen(XtScreen(shell_widget)),
-				(char *)pausebitmap_bits,
-				pausebitmap_width,
-				pausebitmap_height );
-			break;
-
-		case BUTTON_FORWARD:
-        		*pixmap = XCreateBitmapFromData( XtDisplay(shell_widget),
-				RootWindowOfScreen(XtScreen(shell_widget)),
-				(char *)forwardbitmap_bits,
-				forwardbitmap_width,
-				forwardbitmap_height );
-			break;
-
-		case BUTTON_FASTFORWARD:
-        		*pixmap = XCreateBitmapFromData( XtDisplay(shell_widget),
-				RootWindowOfScreen(XtScreen(shell_widget)),
-				(char *)ffbitmap_bits,
-				ffbitmap_width,
-	       			ffbitmap_height );
-			break;
-
-		default:
-			fprintf( stderr, "err: internal error in ncview,\n" );
-			fprintf( stderr, "routine create_pixmap: no recognized value\n" );
-			fprintf( stderr, ">%d<\n", id );
-			exit( 1 );
-			break;
-		}
-}
-
-	void
-x_create_colormap( char *name, unsigned char r[256], unsigned char g[256], unsigned char b[256] )
-{
-	Colormap	orig_colormap, new_colormap;
-	Display		*display;
-	int		i, status;
-	XColor		*color;
-	unsigned long	plane_masks[1], pixels[1];
-	Cmaplist	*cmaplist, *cml;
-	static int	first_time_through = FALSE;
-
-	display = XtDisplay( topLevel );
-
-	if( colormap_list == NULL )
-		first_time_through = TRUE;
-	else
-		first_time_through = FALSE;
-
-	/* Make a new Cmaplist structure, and link it into the list */
-	new_cmaplist( &cmaplist );
-	cmaplist->name = (char *)malloc( (strlen(name)+1)*sizeof(char) );
-	strcpy( cmaplist->name, name );
-	if( first_time_through )
-		colormap_list = cmaplist;
-	else
-		{
-		cml = colormap_list;
-		while( cml->next != NULL )
-			cml = cml->next;
-		cml->next      = cmaplist;
-		cmaplist->prev = cml;
-		}
-
-	if( first_time_through ) {
-
-	/* First time through, allocate the read/write entries in the colormap.
-	 * We always do ten more than the number of colors requested so that
-	 * black can indicate 'fill_value' entries, and the other color entries
-	 * (which are the window elements) can be colored as desired.
-	 */
-		current_colormap_list = cmaplist;
-
-		/* TrueColor device */
-		if( options.display_type == TrueColor ) {
-			for( i=0; i<(options.n_colors+N_EXTRA_COLORS); i++ ) {
-				(cmaplist->color_list+i)->pixel = (long)i;
-				*(cmaplist->pixel_transform+i)  = (ncv_pixel)i;
-				}
-			}
-
-		/* Shared colormap, PseudoColor device */
-		if( (!options.private_colormap) && (options.display_type == PseudoColor) ) {
-			/* Try the standard colormap, and see if 
-			 * it has enough available colorcells.
-			 */
-			orig_colormap    = DefaultColormap( display, 0 );
-			current_colormap = orig_colormap;
-			i      = 0;
-			status = 1;
-			while( (i < (options.n_colors+N_EXTRA_COLORS)) && (status != 0) ) {
-				status = XAllocColorCells( display, orig_colormap, True, 
-					plane_masks, 0, pixels, 1 );
-				(cmaplist->color_list+i)->pixel = *pixels;
-				*(cmaplist->pixel_transform+i)   = (ncv_pixel)*pixels;
-				i++;
-				}
-			}
-
-		/* standard colormap failed for PseudoColor, allocate a private colormap */
-		if( (options.display_type == PseudoColor) && 
-				((status == 0) || (options.private_colormap)) ) {	
-			printf( "Using private colormap...\n" );
-			new_colormap  = XCreateColormap(
-				display,
-				RootWindow( display, DefaultScreen( display ) ),
-				XDefaultVisualOfScreen( XtScreen( topLevel ) ),
-				AllocNone ); 
-			current_colormap = new_colormap;
-			for( i=0; i<(options.n_colors+N_EXTRA_COLORS); i++ )
-				{
-				status = XAllocColorCells( display, new_colormap, 
-						True, plane_masks,
-						0, pixels, 1 );
-				if( status == 0 ) {
-					fprintf( stderr, "ncview: x_create_colormap: couldn't allocate \n" );
-					fprintf( stderr, "requested number of colorcells in a private colormap\n" );
-					fprintf( stderr, "Try requesting fewer colors with the -nc option\n" );
-					exit( -1 );
-					}
-				(cmaplist->color_list+i)->pixel = *pixels;
-				*(cmaplist->pixel_transform+i)  = (ncv_pixel)*pixels;
-				}
-			}
-		pixel_transform = cmaplist->pixel_transform;
-		}
-	else
-		{
-		/* if NOT the first time through, just set the pixel values */
-		for( i=0; i<options.n_colors+N_EXTRA_COLORS; i++ ) {
-			(cmaplist->color_list+i)->pixel =
-				(current_colormap_list->color_list+i)->pixel;
-			*(cmaplist->pixel_transform+i)   = 
-				(ncv_pixel)(current_colormap_list->color_list+i)->pixel;
-			}
-		}
-
-	/* Set the first ten colors including black, the color used for "Fill_Value" entries */
-	for( i=0; i<N_EXTRA_COLORS; i++ ) {
-		color        = cmaplist->color_list+i;
-		color->flags = DoRed | DoGreen | DoBlue;
-		color->red   = 256*(unsigned int)255;
-		color->green = 256*(unsigned int)255;
-		color->blue  = 256*(unsigned int)255;
-		}
-	color        = cmaplist->color_list+1;
-	color->flags = DoRed | DoGreen | DoBlue;
-	color->red   = 256*(unsigned int)0;
-	color->green = 256*(unsigned int)0;
-	color->blue  = 256*(unsigned int)0;
-
-	for( i=N_EXTRA_COLORS; i<options.n_colors+N_EXTRA_COLORS; i++ )
-		{
-		color        = cmaplist->color_list+i;
-		color->flags = DoRed | DoGreen | DoBlue;
-		color->red   = (unsigned int)
-				(256*interp( i-N_EXTRA_COLORS, options.n_colors, r, 256 ));
-		color->green = (unsigned int)
-				(256*interp( i-N_EXTRA_COLORS, options.n_colors, g, 256 ));
-		color->blue  = (unsigned int)
-				(256*interp( i-N_EXTRA_COLORS, options.n_colors, b, 256 ));
-		}
-
-	if( (options.display_type == PseudoColor) && first_time_through )
-		XStoreColors( XtDisplay(topLevel), current_colormap, current_colormap_list->color_list,
-			options.n_colors+N_EXTRA_COLORS );
-}
-
-/* Go forward or backwards in the colormap list, and install the new one.
- * Returns the name of the newly installed colormap.  If do_widgets_flag
- * is false, don't install colormaps on the widgets, just on the topLevel.
- */
-	char *
-x_change_colormap( int delta, int do_widgets_flag )
-{
-	if( delta > 0 )
-		{
-		if( current_colormap_list->next != NULL )
-			current_colormap_list = current_colormap_list->next;
-		else
-			current_colormap_list = colormap_list;
-		}
-	else
-		{
-		if( current_colormap_list->prev != NULL )
-			current_colormap_list = current_colormap_list->prev;
-		else /* go to last colormap */
-			while( current_colormap_list->next != NULL )
-				current_colormap_list = current_colormap_list->next;
-		}
-
-	if( options.display_type == PseudoColor )
-		XStoreColors( XtDisplay(topLevel), current_colormap, 
-			current_colormap_list->color_list,
-			options.n_colors+1 );
-	pixel_transform = current_colormap_list->pixel_transform;
-
-	return( current_colormap_list->name );
-}
-
-	void
-x_draw_2d_field( unsigned char *data, size_t width, size_t height )
-{
-	Display	*display;
-	Screen	*screen;
-	static XImage	*ximage;
-	XGCValues values;
-	GC	gc;
-	static	size_t last_width=0L, last_height=0L;
-	static 	unsigned char *tc_data=NULL;
-
-	dump_to_ppm( data, width, height );
-
-	display = XtDisplay( ccontour_widget );
-	screen  = XtScreen ( ccontour_widget );
-
-	if( options.display_type == TrueColor ) {
-		/* If the TrueColor data array does not yet exist, 
-		 * or is the wrong size, then allocate it.
-		 */
-		if( tc_data == NULL ) {
-			tc_data=(unsigned char *)malloc( server.bitmap_unit*width*height );
-			last_width  = width;
-			last_height = height;
-			}
-		else if( (width!=last_width) || (height!=last_height)) {
-			free( tc_data );
-			last_width  = width;
-			last_height = height;
-			tc_data=(unsigned char *)malloc( server.bitmap_unit*width*height );
-			}
-		/* Convert data to TrueColor representation, with
-		 * the proper number of bytes per pixel
-		 */
-		make_tc_data( data, width, height, tc_data );
-
-		ximage  = XCreateImage(
-			display,
-			XDefaultVisualOfScreen( screen ),
-			XDefaultDepthOfScreen ( screen ),
-			ZPixmap,
-			0,
-			(char *)tc_data, 
-			(unsigned int)width, (unsigned int)height,
-			32, 0 );
-		}
-	else /* display_type == PseudoColor */
-		{
-		ximage  = XCreateImage(
-			display,
-			XDefaultVisualOfScreen( screen ),
-			XDefaultDepthOfScreen ( screen ),
-			ZPixmap,
-			0,
-			(char *)data,
-			(unsigned int)width, (unsigned int)height,
-			8, 0 );
-		}
-
-	gc = XtGetGC( ccontour_widget, (XtGCMask)0, &values );
-
-	if( !valid_display )
-		return;
-
-	XPutImage(
-		display,
-		XtWindow( ccontour_widget ),
-		gc,
-		ximage,
-		0, 0, 0, 0,
-		(unsigned int)width, (unsigned int)height );
-}
-
-/* Converts the byte-scaled data to truecolor representation,
- * using the current color map.  
- */
-	static void
-make_tc_data( unsigned char *data, long width, long height, 
-	unsigned char *tc_data )
-{
-	switch (server.bytes_per_pixel) {
-		case 4: make_tc_data_32( data, width, height, tc_data );
-			break;
-
-		case 3:
-			make_tc_data_24( data, width, height, tc_data );
-			break;
-
-		case 2:
-			make_tc_data_16( data, width, height, tc_data );
-			break;
-
-		default:
-			fprintf( stderr, "Sorry, I am not set up to produce ");
-			fprintf( stderr, "images of %d bytes per pixel.\n", 
-					server.bytes_per_pixel );
-			exit( -1 );
-			break;
-		}
-}
-
-	static void
-make_tc_data_16( unsigned char *data, long width, long height, 
-		unsigned char *tc_data )
-{
-	int	i, j, pix;
-
-	/****************************************
-	 *    Least significant bit first
-	 ****************************************/
-	for( i=0; i<width; i++ )
-	for( j=0; j<height; j++ ) {
-
-		pix = *(data+i+j*width);
-
-		*(tc_data+i*2+j*(width*2)) = 
-			(unsigned char)((current_colormap_list->color_list+pix)->blue>>server.shift_blue & server.mask_blue);
-
-		*(tc_data+i*2+1+j*(width*2)) = 
-			(unsigned char)((current_colormap_list->color_list+pix)->green>>server.shift_green_upper & server.mask_green_upper);
-
-
-		*(tc_data+i*2+j*(width*2)) = *(tc_data+i*2+j*(width*2)) +
-			(unsigned char)((current_colormap_list->color_list+pix)->green>>server.shift_green_lower & server.mask_green_lower );
-
-		*(tc_data+i*2+1+j*(width*2)) = *(tc_data+i*2+1+j*(width*2)) +
-			(unsigned char)((current_colormap_list->color_list+pix)->red>>server.shift_red & server.mask_red );
-		}
-
-
-}
-
-	static void
-make_tc_data_24( unsigned char *data, long width, long height, 
-		unsigned char *tc_data )
-{
-	int	i, j, pix, o_r, o_g, o_b;
-	long	pad_offset, po_val;
-
-	if( server.rgb_order == ORDER_RGB ) {
-		o_r = 2;
-		o_g = 1;
-		o_b = 0;
-		}
-	else
-		{
-		o_r = 0;
-		o_g = 1;
-		o_b = 2;
-		}
-
-	/* pad to server.bitmap_pad bits if required */
-	pad_offset = 0L;
-	po_val     = 0L;
-	if( (((width*3)%4) != 0) && (server.bits_per_pixel != server.bitmap_pad) ) 
-		po_val = (server.bitmap_pad/8) - (width*3)%4;
-
-	for( j=0; j<height; j++ ) {
-		for( i=0; i<width; i++ ) {
-
-			pix = *(data+i+j*width);
-			*(tc_data+i*3+o_b+j*(width*3)+pad_offset) = 
-				(char)((current_colormap_list->color_list+pix)->blue>>8);
-			*(tc_data+i*3+o_g+j*(width*3)+pad_offset) = 
-				(char)((current_colormap_list->color_list+pix)->green>>8);
-			*(tc_data+i*3+o_r+j*(width*3)+pad_offset) = 
-				(char)((current_colormap_list->color_list+pix)->red>>8);
-			}
-			pad_offset += po_val;
-		}
-}
-
-	static void
-make_tc_data_32( unsigned char *data, long width, long height, 
-		unsigned char *tc_data )
-{
-	int	i, j, pix, o_r, o_g, o_b;
-
-	if( server.rgb_order == ORDER_RGB ) {
-		o_r = 2;
-		o_g = 1;
-		o_b = 0;
-		}
-	else
-		{
-		o_r = 0;
-		o_g = 1;
-		o_b = 2;
-		}
-	if( server.byte_order == MSBFirst ) {
-		o_r++;
-		o_g++;
-		o_b++;
-		}
-
-	for( i=0; i<width; i++ )
-	for( j=0; j<height; j++ ) {
-
-/*
-*(tc_data+i*4+0 +j*(width*4)) = 0;
-*(tc_data+i*4+1 +j*(width*4)) = 0;
-*(tc_data+i*4+2 +j*(width*4)) = 128;
-*(tc_data+i*4+3 +j*(width*4)) = 0;
-printf( "%d ", pix);
-*/
-		pix = *(data+i+j*width);
-		*(tc_data+i*4+o_b+j*(width*4)) = 
-			(char)((current_colormap_list->color_list+pix)->blue>>8);
-		*(tc_data+i*4+o_g+j*(width*4)) = 
-			(char)((current_colormap_list->color_list+pix)->green>>8);
-		*(tc_data+i*4+o_r+j*(width*4)) = 
-			(char)((current_colormap_list->color_list+pix)->red>>8);
-		}
-}
-
-	void
-x_set_speed_proc( Widget scrollbar, XtPointer client_data, XtPointer position )
-{
-	float	f_pos;
-
-	f_pos = *(float *)position;
-	options.frame_delay = f_pos;
-}
-
-	void
-x_set_2d_size( size_t width, size_t height )
-{
-	size_t		new_width, new_height;
-	Dimension 	widget_height;
-
-	new_width = width;
-	new_height = height;
-	if( options.want_extra_info ) {
-		XtVaGetValues( ccontour_info1_widget, 
-					XtNheight, &widget_height, NULL );
-		new_height += widget_height+4L;
-		XtVaGetValues( ccontour_info2_widget, 
-					XtNheight, &widget_height, NULL );
-		new_height += widget_height+4L;
-		}
-
-	XtResizeWidget( ccontourpanel_widget, (Dimension)(new_width+2L), (Dimension)(new_height+2L), 0 );
-	XtResizeWidget( ccontour_form_widget, (Dimension)(new_width+2L), (Dimension)(new_height+2L), 0 );
-	XtResizeWidget( ccontour_widget,      (Dimension)width, (Dimension)height, 1 );
-}
-
-	void
-x_set_label( int id, char *string )
-{
-	switch( id ) {
-		case LABEL_1:
-			x_set_lab( label1_widget, string, app_data.label_width );
-			break;
-
-		case LABEL_2:
-			x_set_lab( label2_widget, string, app_data.label_width );
-			break;
-
-		case LABEL_3:
-			x_set_lab( label3_widget, string, app_data.label_width );
-			break;
-
-		case LABEL_4:
-			x_set_lab( label4_widget, string, app_data.label_width );
-			break;
-
-		case LABEL_5:
-			x_set_lab( label5_widget, string, app_data.label_width );
-			break;
-
-		case LABEL_COLORMAP_NAME:
-			x_set_lab( cmap_button_widget, string,
-							app_data.button_width );
-			break;
-
-		case LABEL_BLOWUP:
-			x_set_lab( blowup_widget, string,
-							app_data.button_width );
-			break;
-
-		case LABEL_TRANSFORM:
-			x_set_lab( transform_widget, string,
-							app_data.button_width );
-			break;
-
-		case LABEL_CCINFO_1:
-			x_set_lab( ccontour_info1_widget, string, 0 );
-			break;
-
-		case LABEL_CCINFO_2:
-			x_set_lab( ccontour_info2_widget, string, 0 );
-			break;
-
-		case LABEL_BLOWUP_TYPE:
-			x_set_lab( blowup_type_widget, string, app_data.button_width );
-			break;
-
-		default:
-			fprintf( stderr, "ncview: x_set_label: internal error,\n" );
-			fprintf( stderr, "unknown label id %d\n", id );
-			exit( -1 );
-		}
-}
-
-	void
-x_set_lab( Widget w, char *s, int width )
-{
-	XtVaSetValues( w, XtNlabel, s,     NULL );
-	if( width != 0 )
-		XtVaSetValues( w, XtNwidth, width, NULL );
-}
-
-/*************************** X interface button callbacks ************************/
-	static void
-add_callbacks()
-{
-        XtAddCallback( quit_button_widget,         XtNcallback, quit_mod1,         NULL);
-        XtAddCallback( cmap_button_widget,         XtNcallback, cmap_mod1,         NULL );
-        XtAddCallback( restart_button_widget,      XtNcallback, restart_mod1,      NULL );
-        XtAddCallback( reverse_button_widget,      XtNcallback, reverse_mod1,      NULL );
-        XtAddCallback( backwards_button_widget,    XtNcallback, back_mod1,         NULL );
-        XtAddCallback( pause_button_widget,        XtNcallback, pause_mod1,        NULL );
-        XtAddCallback( forward_button_widget,      XtNcallback, forward_mod1,      NULL );
-        XtAddCallback( fastforward_button_widget,  XtNcallback, ff_mod1,           NULL );
-        XtAddCallback( edit_button_widget,         XtNcallback, edit_mod1,         NULL );
-        XtAddCallback( info_button_widget,         XtNcallback, info_mod1,         NULL );
-        XtAddCallback( invert_button_widget,       XtNcallback, invert_mod1,       NULL );
-        XtAddCallback( invert_color_button_widget, XtNcallback, invert_color_mod1, NULL );
-        XtAddCallback( blowup_widget,              XtNcallback, blowup_mod1,       NULL );
-        XtAddCallback( transform_widget,           XtNcallback, transform_mod1,    NULL );
-        XtAddCallback( dimset_widget,              XtNcallback, dimset_mod1,       NULL );
-        XtAddCallback( range_widget,               XtNcallback, range_mod1,        NULL );
-	XtAddCallback( scrollspeed_widget,         XtNjumpProc, x_set_speed_proc,  NULL );
-	XtAddCallback( options_button_widget,      XtNcallback, options_mod1,      NULL );
-
-        XtAddCallback( blowup_type_widget,         XtNcallback, blowup_type_mod1,        NULL );
-        XtAddCallback( print_button_widget,        XtNcallback, print_button_callback,        NULL );
-}
-
-        void
-options_mod1( Widget widget, XtPointer client_data, XtPointer call_data)
-{
-	in_button_pressed( BUTTON_OPTIONS, MOD_1 );
-}
-
-        void
-range_mod1(widget, client_data, call_data)
-Widget widget;
-XtPointer client_data;
-XtPointer call_data;
-{
-	in_button_pressed( BUTTON_RANGE, MOD_1 );
-}
-
-        void
-print_button_callback(widget, client_data, call_data)
-Widget widget;
-XtPointer client_data;
-XtPointer call_data;
-{
-	in_button_pressed( BUTTON_PRINT, MOD_1 );
-}
-
-        void
-blowup_type_mod1(widget, client_data, call_data)
-Widget widget;
-XtPointer client_data;
-XtPointer call_data;
-{
-	in_button_pressed( BUTTON_BLOWUP_TYPE, MOD_1 );
-}
-
-	void
-range_mod3( Widget w, XButtonEvent *event, String *params, Cardinal *num_params )
-{
-	in_button_pressed( BUTTON_RANGE, MOD_3 );
-}
-
-        void
-dimset_mod1(widget, client_data, call_data)
-Widget widget;
-XtPointer client_data;
-XtPointer call_data;
-{
-	in_button_pressed( BUTTON_DIMSET, MOD_1 );
-}
-
-        void
-quit_mod1(widget, client_data, call_data)
-Widget widget;
-XtPointer client_data;
-XtPointer call_data;
-{
-	in_button_pressed( BUTTON_QUIT, MOD_1 );
-}
-
-        void
-cmap_mod1(widget, client_data, call_data)
-Widget widget;
-XtPointer client_data;
-XtPointer call_data;
-{
-	in_button_pressed( BUTTON_COLORMAP_SELECT, MOD_1 );
-}
-
-	void
-cmap_mod3( Widget w, XButtonEvent *event, String *params, Cardinal *num_params )
-{
-	in_button_pressed( BUTTON_COLORMAP_SELECT, MOD_3 );
-}
-
-	void
-do_plot_xy( Widget w, XButtonEvent *event, String *params, Cardinal *num_params )
-{
-	plot_XY();
-}
-
-	void
-do_set_dataedit_place( Widget w, XButtonEvent *event, String *params, Cardinal *num_params )
-{
-	set_dataedit_place();
-}
-
-	void
-do_set_min_from_curdata( Widget w, XButtonEvent *event, String *params, Cardinal *num_params )
-{
-	set_min_from_curdata();
-}
-
-	void
-do_set_max_from_curdata( Widget w, XButtonEvent *event, String *params, Cardinal *num_params )
-{
-	set_max_from_curdata();
-}
-
-        void
-diminfo_cur_mod1(widget, client_data, call_data)
-Widget widget;
-XtPointer client_data;
-XtPointer call_data;
-{
-	int	i = 0;
-	Widget	*w;
-	String	label;
-
-	while( (w = diminfo_cur_widget+i) != NULL ) {
-		if( *w == widget ) {
-			XtVaGetValues( *(diminfo_name_widget+i), 
-						XtNlabel, &label, NULL );
-			in_change_current( label, MOD_1 );
-			return;
-			}
-		i++;
-		}
-	fprintf( stderr, "ncview: diminfo_cur_mod1 callback: can't find " );
-	fprintf( stderr, "widget for the pressed button\n" );
-	exit( -1 );
-}
-
-	void
-diminfo_cur_mod2( Widget widget, XButtonEvent *event, String *params, 
-							Cardinal *num_params )
-{
-	int	i = 0;
-	Widget	*w;
-	String	label;
-
-	while( (w = diminfo_cur_widget+i) != NULL ) {
-		if( *w == widget ) {
-			XtVaGetValues( *(diminfo_name_widget+i), 
-						XtNlabel, &label, NULL );
-			in_change_current( label, MOD_2 );
-			return;
-			}
-		i++;
-		}
-	fprintf( stderr, "ncview: diminfo_cur_mod2 callback: can't find " );
-	fprintf( stderr, "widget for the pressed button\n" );
-	exit( -1 );
-}
-
-	void
-diminfo_cur_mod3( Widget widget, XButtonEvent *event, String *params, 
-							Cardinal *num_params )
-{
-	int	i = 0;
-	Widget	*w;
-	String	label;
-
-	while( (w = diminfo_cur_widget+i) != NULL ) {
-		if( *w == widget ) {
-			XtVaGetValues( *(diminfo_name_widget+i), 
-						XtNlabel, &label, NULL );
-			in_change_current( label, MOD_3 );
-			return;
-			}
-		i++;
-		}
-	fprintf( stderr, "ncview: diminfo_cur_mod3 callback: can't find " );
-	fprintf( stderr, "widget for the pressed button\n" );
-	exit( -1 );
-}
-
-	void
-diminfo_cur_mod4( Widget widget, XButtonEvent *event, String *params, 
-							Cardinal *num_params )
-{
-	int	i = 0;
-	Widget	*w;
-	String	label;
-
-	while( (w = diminfo_cur_widget+i) != NULL ) {
-		if( *w == widget ) {
-			XtVaGetValues( *(diminfo_name_widget+i), 
-						XtNlabel, &label, NULL );
-			in_change_current( label, MOD_4 );
-			return;
-			}
-		i++;
-		}
-	fprintf( stderr, "ncview: diminfo_cur_mod4 callback: can't find " );
-	fprintf( stderr, "widget for the pressed button\n" );
-	exit( -1 );
-}
-
-        void
-restart_mod1(widget, client_data, call_data)
-Widget widget;
-XtPointer client_data;
-XtPointer call_data;
-{
-	in_button_pressed( BUTTON_RESTART, MOD_1 );
-}
-
-        void
-reverse_mod1(widget, client_data, call_data)
-Widget widget;
-XtPointer client_data;
-XtPointer call_data;
-{
-	in_button_pressed( BUTTON_REWIND, MOD_1 );
-}
-
-	void
-reverse_mod2( Widget w, XButtonEvent *event, String *params, Cardinal *num_params )
-{
-	in_button_pressed( BUTTON_REWIND, MOD_2 );
-}
-
-	void
-back_mod2( Widget w, XButtonEvent *event, String *params, Cardinal *num_params )
-{
-	in_button_pressed( BUTTON_BACKWARDS, MOD_2 );
-}
-
-        void
-back_mod1(widget, client_data, call_data)
-Widget widget;
-XtPointer client_data;
-XtPointer call_data;
-{
-	in_button_pressed( BUTTON_BACKWARDS, MOD_1 );
-}
-
-        void
-pause_mod1(widget, client_data, call_data)
-Widget widget;
-XtPointer client_data;
-XtPointer call_data;
-{
-	in_button_pressed( BUTTON_PAUSE, MOD_1 );
-}
-
-        void
-forward_mod1(widget, client_data, call_data)
-Widget widget;
-XtPointer client_data;
-XtPointer call_data;
-{
-	in_button_pressed( BUTTON_FORWARD, MOD_1 );
-}
-
-	void
-forward_mod2( Widget w, XButtonEvent *event, String *params, Cardinal *num_params )
-{
-	in_button_pressed( BUTTON_FORWARD, MOD_2 );
-}
-
-        void
-edit_mod1(widget, client_data, call_data)
-Widget widget;
-XtPointer client_data;
-XtPointer call_data;
-{
-	in_button_pressed( BUTTON_EDIT, MOD_1 );
-}
-
-        void
-info_mod1(widget, client_data, call_data)
-Widget widget;
-XtPointer client_data;
-XtPointer call_data;
-{
-	in_button_pressed( BUTTON_INFO, MOD_1 );
-}
-
-        void
-ff_mod1(widget, client_data, call_data)
-Widget widget;
-XtPointer client_data;
-XtPointer call_data;
-{
-	in_button_pressed( BUTTON_FASTFORWARD, MOD_1 );
-}
-
-	void
-fastforward_mod2( Widget w, XButtonEvent *event, String *params, Cardinal *num_params )
-{
-	in_button_pressed( BUTTON_FASTFORWARD, MOD_2 );
-}
-
-        void
-invert_mod1(widget, client_data, call_data)
-Widget widget;
-XtPointer client_data;
-XtPointer call_data;
-{
-	in_button_pressed( BUTTON_INVERT_PHYSICAL, MOD_1 );
-}
-
-        void
-invert_color_mod1(widget, client_data, call_data)
-Widget widget;
-XtPointer client_data;
-XtPointer call_data;
-{
-	in_button_pressed( BUTTON_INVERT_COLORMAP, MOD_1 );
-}
-
-        void
-blowup_mod1(widget, client_data, call_data)
-Widget widget;
-XtPointer client_data;
-XtPointer call_data;
-{
-	in_button_pressed( BUTTON_BLOWUP, MOD_1 );
-}
-
-	void
-blowup_mod4( Widget w, XButtonEvent *event, String *params, Cardinal *num_params )
-{
-	in_button_pressed( BUTTON_BLOWUP, MOD_4 );
-}
-
-	void
-blowup_mod3( Widget w, XButtonEvent *event, String *params, Cardinal *num_params )
-{
-	in_button_pressed( BUTTON_BLOWUP, MOD_3 );
-}
-
-	void
-blowup_mod2( Widget w, XButtonEvent *event, String *params, Cardinal *num_params )
-{
-	in_button_pressed( BUTTON_BLOWUP, MOD_2 );
-}
-
-        void
-transform_mod1(widget, client_data, call_data)
-Widget widget;
-XtPointer client_data;
-XtPointer call_data;
-{
-	in_button_pressed( BUTTON_TRANSFORM, MOD_1 );
-}
-
-        void
-varlist_mod1(widget, client_data, call_data)
-Widget widget;
-XtPointer client_data;
-XtPointer call_data;
-{
-	char	*widget_name;
-
-	/* Only respond to 'set' calls, not 'unset' calls... */
-	if( call_data == 0 )
-		return;
-
-	widget_name = XawToggleGetCurrent( *varlist_widget );
-	if( widget_name == NULL )	/* happens because first call to */
-		return;			/* ToggleSet unsets the previous */
-					/* selection, which is NULL      */
-	/* advance past the leading 'varsel_' */
-	widget_name += strlen( "varsel_" );
-	in_variable_selected( widget_name );
-}
-
-	void
-x_set_var_sensitivity( char *varname, int sens )
-{
-	int	i = 0;
-	String	label;
-
-	while( (varlist_widget+i) != NULL ) {
-		XtVaGetValues( *(varlist_widget+i), XtNlabel, &label, NULL );
-		if( strcmp( varname, label ) == 0 ) {
-			XtVaSetValues(  *(varlist_widget+i),
-					XtNsensitive, sens, NULL );
-			if( sens == FALSE ) 
-				XtVaSetValues(  *(varlist_widget+i),
-					XtNstate, FALSE, NULL );
-			return;
-			}
-		i++;
-		}
-	fprintf( stderr, "ncview: x_set_var_sensitivity: can't find " );
-	fprintf( stderr, "widget for variable %s\n", varname );
-	exit( -1 );
-}
-
-	void
-x_process_user_input()
-{
-	for(;;)
-		{
-		XtAppNextEvent( x_app_context, &event );
-		XtDispatchEvent( &event );
-		}
-}
-
-	void
-x_timer_set( XtTimerCallbackProc procedure, XtPointer client_arg )
-{
-	unsigned long	delay_millisec;
-
-	delay_millisec = (long)(350.0 * options.frame_delay) + 10L;
-
-	timer = XtAppAddTimeOut( 
-		x_app_context,
-		delay_millisec,
-		procedure,
-		client_arg );
-	timer_enabled = TRUE;
-}
-
-	void
-x_timer_clear()
-{
-	if( timer_enabled ) {
-		XtRemoveTimeOut( timer );
-		timer_enabled = FALSE;
-		}
-}
-
-	void
-x_indicate_active_var( char *var_name )
-{
-	Widget	*w;
-	String	label;
-	int	i = 0;
-
-	w = varlist_widget;
-	while( *w != NULL ) {
-		XtVaGetValues( *w, XtNlabel, &label, NULL );
-		if( strcmp( label, var_name ) == 0 ) {
-			XtVaGetValues( *(varlist_widget+i), XtNradioData, &label, NULL );
-			XawToggleSetCurrent( *varlist_widget, (XtPointer)label );
-			return;
-			}
-		w = (varlist_widget + ++i );
-		}
-
-	fprintf( stderr, "ncview: x_indicate_active_var: cannot find " );
-	fprintf( stderr, "widget for variable named >%s<\n", var_name );
-	exit( -1 );
-}
-
-	void
-x_indicate_active_dim( int dimension, char *dim_name )
-{
-	Widget	*w;
-	String	label;
-	int	i = 0;
-	char	new_label[ 132 ];
-
-	if( dimension == DIMENSION_X )
-		sprintf( new_label, "X:" );
-	else if( dimension == DIMENSION_Y )
-		sprintf( new_label, "Y:" );
-	else if( dimension == DIMENSION_SCAN )
-		sprintf( new_label, "Scan:" );
-	else if( dimension == DIMENSION_NONE )
-		sprintf( new_label, " " );
-	else
-		{
-		fprintf( stderr, "ncview: x_indicate_active_dim: unknown " );
-		fprintf( stderr, "dimension received: %d\n", dimension     );
-		exit( -1 );
-		}
-
-	i = 0;
-	w = diminfo_name_widget;
-	while( *w != NULL ) {
-		XtVaGetValues( *w, XtNlabel, &label, NULL );
-		if( strcmp( label, dim_name ) == 0 ) {
-			XtVaSetValues( *(diminfo_dim_widget+i), 
-					XtNlabel, new_label,
-					XtNwidth, app_data.dimlabel_width, NULL);
-			return;
-			}
-		w = (diminfo_name_widget + ++i );
-		}
-
-	fprintf( stderr, "ncview: x_indicate_active_dim: cannot find " );
-	fprintf( stderr, "widget for dimension %d, named %s\n", 
-							dimension, dim_name );
-	exit( -1 );
-}
-
-	void
-x_set_sensitive( int button_id, int state )
-{
-	switch( button_id ) {
-		case BUTTON_BLOWUP_TYPE:	
-			XtVaSetValues( blowup_type_widget, XtNsensitive, state, NULL );
-			break;
-
-		case BUTTON_RANGE:	
-			XtVaSetValues( range_widget, XtNsensitive, state, NULL );
-			break;
-
-		case BUTTON_DIMSET:	
-			XtVaSetValues( dimset_widget, XtNsensitive, state, NULL );
-			break;
-
-		case BUTTON_RESTART:
-			XtVaSetValues( restart_button_widget, XtNsensitive, state, NULL );
-			break;
-
-		case BUTTON_REWIND:	
-			XtVaSetValues( reverse_button_widget, XtNsensitive, state, NULL );
-			break;
-
-		case BUTTON_BACKWARDS:
-			XtVaSetValues( backwards_button_widget, XtNsensitive, state, NULL );
-			break;
-
-		case BUTTON_PAUSE:
-			XtVaSetValues( pause_button_widget, XtNsensitive, state, NULL );
-			break;
-
-		case BUTTON_FORWARD:
-			XtVaSetValues( forward_button_widget, XtNsensitive, state, NULL );
-			break;
-
-		case BUTTON_FASTFORWARD:
-			XtVaSetValues( fastforward_button_widget, XtNsensitive, state, NULL );
-			break;
-
-		case BUTTON_COLORMAP_SELECT:
-			XtVaSetValues( cmap_button_widget, XtNsensitive, state, NULL );
-			break;
-
-		case BUTTON_INVERT_PHYSICAL:
-			XtVaSetValues( invert_button_widget, XtNsensitive, state, NULL );
-			break;
-
-		case BUTTON_INVERT_COLORMAP:
-			XtVaSetValues( invert_color_button_widget, XtNsensitive, state, NULL );
-			break;
-
-		case BUTTON_BLOWUP:
-			XtVaSetValues( blowup_widget, XtNsensitive, state, NULL );
-			break;
-
-		case BUTTON_TRANSFORM:
-			XtVaSetValues( transform_widget, XtNsensitive, state, NULL );
-			break;
-
-		case BUTTON_EDIT:
-			XtVaSetValues( edit_button_widget, XtNsensitive, state, NULL );
-			break;
-
-		case BUTTON_INFO:
-			XtVaSetValues( info_button_widget, XtNsensitive, state, NULL );
-			break;
-
-		case BUTTON_PRINT:
-			XtVaSetValues( print_button_widget, XtNsensitive, state, NULL );
-			break;
-		}
-}
-
-	void
-x_force_set_invert_state( int state )
-{
-	XtVaSetValues( invert_button_widget, XtNstate, state, NULL );
-}
-
-	void
-x_clear_dim_buttons()
-{
-	Widget	w;
-	int	i;
-
-	if( xdimlist_widget == NULL )
-		return;
-
-	i=0;
-	while( (w = *(xdimlist_widget + i++)) != NULL )
-		XtDestroyWidget( w );
-
-	i=0;
-	while( (w = *(ydimlist_widget + i++)) != NULL )
-		XtDestroyWidget( w );
-}
-
-	int
-x_set_scan_dims( Stringlist *dim_list, char *x_axis_name, char *y_axis_name,
-	Stringlist **new_dim_list )
-{
-	Position	width, height, root_x, root_y;
-	char		*new_xdim_name, *new_ydim_name;
-	char		*x_prefix = "xsel_", *y_prefix = "ysel_"; 
-	int		i;
-
-	if( options.display_type == TrueColor )
-		dimsel_popup_widget = XtVaCreatePopupShell(
-			"Dimension Select",
-			transientShellWidgetClass,
-			topLevel,
-			NULL );
-	else if( valid_display ) 
-		dimsel_popup_widget = XtVaCreatePopupShell(
-			"Dimension Select",
-			transientShellWidgetClass,
-			topLevel,
-			XtNcolormap, current_colormap,
-			NULL );
-	else
-		dimsel_popup_widget = XtVaCreatePopupShell(
-			"Dimension Select",
-			transientShellWidgetClass,
-			topLevel,
-			NULL );
-
-	dimsel_popupcanvas_widget = XtVaCreateManagedWidget(
-		"dimsel_popupcanvas",
-		formWidgetClass,
-		dimsel_popup_widget,
-		XtNborderWidth, 0,
-		NULL);
-
-	ydim_selection_widget = XtVaCreateManagedWidget(
-		"ydimselectbox",
-		boxWidgetClass,
-		dimsel_popupcanvas_widget,
-		XtNorientation, XtorientHorizontal,
-		NULL);
-
-	ydimlist_label_widget = XtVaCreateManagedWidget(
-		"ydimlist_label",
-		labelWidgetClass,
-		ydim_selection_widget,
-		XtNwidth, app_data.button_width,
-		XtNjustify, XtJustifyRight,
-		XtNlabel, "Y Dim:",
-		NULL );
-
-	xdim_selection_widget = XtVaCreateManagedWidget(
-		"xdimselectbox",
-		boxWidgetClass, 
-		dimsel_popupcanvas_widget,
-		XtNfromVert, ydim_selection_widget,
-		XtNorientation, XtorientHorizontal,
-		NULL);
-
-	xdimlist_label_widget = XtVaCreateManagedWidget(
-		"xdimlist_label",
-		labelWidgetClass,
-		xdim_selection_widget,
-		XtNwidth, app_data.button_width,
-		XtNjustify, XtJustifyRight,
-		XtNlabel, "X Dim:",
-		NULL );
-
-	x_make_dim_button_util( DIMENSION_Y,    dim_list, y_prefix,
-			&ydimlist_widget, ydim_selection_widget, y_axis_name );
-	x_make_dim_button_util( DIMENSION_X,    dim_list, x_prefix,    
-			&xdimlist_widget, xdim_selection_widget, x_axis_name );
-
-	dimsel_ok_button_widget = XtVaCreateManagedWidget(
-		"OK",
-		commandWidgetClass,
-		dimsel_popupcanvas_widget,
-		XtNfromVert, xdim_selection_widget,
-		NULL);
-
-	dimsel_cancel_button_widget = XtVaCreateManagedWidget(
-		"Cancel",
-		commandWidgetClass,
-		dimsel_popupcanvas_widget,
-		XtNfromVert, xdim_selection_widget,
-		XtNfromHoriz, dimsel_ok_button_widget,
-		NULL);
-
-        XtAddCallback( dimsel_ok_button_widget, XtNcallback, 
-			dimsel_callback, (XtPointer)MESSAGE_OK );
-        XtAddCallback( dimsel_cancel_button_widget, XtNcallback, 
-			dimsel_callback, (XtPointer)MESSAGE_CANCEL );
-
-	XtVaGetValues    ( commandcanvas_widget, XtNwidth,  &width, 
-					XtNheight, &height, NULL );
-	XtTranslateCoords( commandcanvas_widget, (Position)width,
-					(Position)height, &root_x, &root_y );
-	XtVaSetValues    ( dimsel_popup_widget, XtNx, root_x/2, XtNy, root_y/2, NULL );
-	XtPopup          ( dimsel_popup_widget, XtGrabExclusive );
-
-	if( options.display_type == PseudoColor )
-		XSetWindowColormap( XtDisplay(topLevel), XtWindow(dimsel_popup_widget), 
-				current_colormap );
-
-	/* This mini main event loop just handles the dimension selection popup */
-	dimsel_popup_done = FALSE;
-	while( ! dimsel_popup_done ) {
-		XtAppNextEvent( x_app_context, &event );
-		XtDispatchEvent( &event );
-		}
-
-	if( dimsel_popup_result == MESSAGE_OK ) {
-		new_ydim_name = XawToggleGetCurrent( *ydimlist_widget );
-		new_xdim_name = XawToggleGetCurrent( *xdimlist_widget );
-
-		/* advance past the leading prefixes */
-		for( i=strlen(y_prefix); *(new_ydim_name+i) != '\0'; i++ )
-			*(new_ydim_name+i-strlen(y_prefix)) = *(new_ydim_name+i);
-		*(new_ydim_name+i-strlen(y_prefix)) = '\0';
-		for( i=strlen(x_prefix); *(new_xdim_name+i) != '\0'; i++ )
-			*(new_xdim_name+i-strlen(x_prefix)) = *(new_xdim_name+i);
-		*(new_xdim_name+i-strlen(x_prefix)) = '\0';
-		add_to_stringlist( new_dim_list, new_ydim_name, NULL );
-		add_to_stringlist( new_dim_list, new_xdim_name, NULL );
-		}
-
-	XtPopdown( dimsel_popup_widget );
-
-	XtDestroyWidget( dimsel_cancel_button_widget );
-	XtDestroyWidget( dimsel_ok_button_widget   );
-	XtDestroyWidget( dimsel_popupcanvas_widget );
-	XtDestroyWidget( dimsel_popup_widget       );
-
-	dimsel_popup_widget = NULL;
-
-	return( dimsel_popup_result );
-}
-
-        void
-dimsel_callback(widget, client_data, call_data)
-Widget widget;
-XtPointer client_data;
-XtPointer call_data;
-{
-	dimsel_popup_result = (int)client_data;
-	dimsel_popup_done   = TRUE;
-}
-
-	void
-x_make_dim_button_util( int dimension, Stringlist *dim_list, char *prefix, 
-	Widget **dimlist_widget, Widget parent_widget, char *selected_name )
-{
-	Widget		*w;
-	int	   	i, n_dims;
-	Stringlist 	*s;
-	char		widget_name[ 64 ];
-	String		label;
-
-	/* Make the widget array; set the last element to NULL so that 
-	 * we can find it later.
-	 */
-	n_dims          = n_strings_in_list( dim_list );
-	*dimlist_widget = (Widget *)malloc( (n_dims+1)*sizeof(Widget));
-	if( *dimlist_widget == NULL ) {
-		fprintf( stderr, "ncview: x_make_dim_buttons: malloc ");
-		fprintf( stderr, "failed on dimlist_widget initialization\n" );
-		exit( -1 );
-		}
-	*(*dimlist_widget+n_dims) = NULL;
-
-	s = dim_list;
-	i = 0;
-	while( s != NULL )
-		{
-		sprintf( widget_name, "%s%s", prefix, s->string );
-		if( i == 0 )
-			*(*dimlist_widget + i) = XtVaCreateManagedWidget(
-				widget_name,
-				toggleWidgetClass,
-				parent_widget,
-				XtNwidth, app_data.button_width,
-				XtNlabel, s->string,
-				NULL);
-		else
-			*(*dimlist_widget + i) = XtVaCreateManagedWidget(
-				widget_name,
-				toggleWidgetClass,
-				parent_widget,
-				XtNlabel, s->string,
-				XtNwidth, app_data.button_width,
-				XtNradioGroup, **dimlist_widget,
-				NULL);
-		s = s->next;
-		i++;
-		}
-
-	/* Now, set the initial value on the appropriate widget */
-	i = 0;
-	w = *dimlist_widget;
-	while( *w != NULL ) {
-		XtVaGetValues( *w, XtNlabel, &label, NULL );
-		if( strcmp( label, selected_name ) == 0 ) {
-			XtVaGetValues( *(*dimlist_widget+i), XtNradioData, &label, NULL );
-			XawToggleSetCurrent( **dimlist_widget, (XtPointer)label );
-			return;
-			}
-		w = (*dimlist_widget + ++i );
-		}
-	fprintf( stderr, "?didn't find a match for name >%s<\n",
-				selected_name );
-}
-
-	void
-check_app_res( AppDataPtr ad )
-{
-	if( ad->delta_step > 100 ) {
-		fprintf( stderr, "ncview: check_app_data: error in resource " );
-		fprintf( stderr, "file entry for deltaStep.  Syntax is:\n" );
-		fprintf( stderr, "if deltaStep > 0, then it indicates the " );
-		fprintf( stderr, "integer *percent* (from 1 to 100) to step \n");
-		fprintf( stderr, "on each press of the forward or backward ");
-		fprintf( stderr, "buttons while holding down the Ctrl key.\n");
-		fprintf( stderr, "If deltaStep < 0, it indicates the number ");
-		fprintf( stderr, "of frames to step in such events.\n" );
-		exit( -1 );
-		}
-	
-	if( (ad->button_width > 500) ||
-	    (ad->button_width < 10)   ) {
-		fprintf( stderr, "ncview: check_app_data: error in resource " );
-		fprintf( stderr, "file entry for buttonWidth.  Acceptable\n" );
-		fprintf( stderr, "range is 10 to 500\n" );
-		exit( -1 );
-		}
-
-	if( (ad->label_width > 2000) ||
-	    (ad->label_width < 100)   ) {
-		fprintf( stderr, "ncview: check_app_data: error in resource " );
-		fprintf( stderr, "file entry for labelWidth.  Acceptable\n" );
-		fprintf( stderr, "range is 100 to 2000\n" );
-		exit( -1 );
-		}
-
-	if( (ad->n_vars_per_row > 20) || 
-	    (ad->n_vars_per_row < 1 ) ) {
-		fprintf( stderr, "ncview: check_app_data: error in resource " );
-		fprintf( stderr, "file entry for NVarsPerRow.  Acceptable\n" );
-		fprintf( stderr, "range is 1 to 20\n" );
-		exit( -1 );
-		}
-
-	if( fabs(ad->version - APP_RES_VERSION) > 0.001 ) {
-fprintf(stderr, "Error: I cannot find the proper app-defaults file, which\n");
-fprintf(stderr, "should be named `Ncview'.  I need an app-defaults file\n" );
-fprintf(stderr, "for ncview version %.2f, but have found version %.2f.\n", 
-		APP_RES_VERSION, ad->version );
-if( fabs(ad->version) < 0.01 )  {
-fprintf(stderr, "(Note: a found version of 0.00 means either no\n" ); 
-fprintf(stderr, "app-defaults file was found at all, or a pre-version 1.60\n");
-fprintf(stderr, "file was found.)\n" );
-				}
-fprintf(stderr, "To fix this, you must put file `Ncview'\n");
-fprintf(stderr, "(NOT the executable, which is named `ncview') either in \n");
-fprintf(stderr, "your local $XAPPLRESDIR directory, in the global directory\n");
-fprintf(stderr, "/usr/local/lib/X11/app-defaults, or add it to your own\n" );
-fprintf(stderr, ".Xdefaults file.\n" );
-		exit( -1 );
-		}
-
-}
-
-	void
-x_error( char *message )
-{
-	x_dialog( message, NULL, FALSE );
-}
-
-	int
-x_dialog( char *message, char *ret_string, int want_cancel_button )
-{
-	Position	width, height, root_x, root_y;
-	static Widget	ok_button_widget, cancel_button_widget;
-
-	if( options.display_type == TrueColor )
-		error_popup_widget = XtVaCreatePopupShell(
-			"popup",
-			transientShellWidgetClass,
-			topLevel,
-			NULL );
-	else if( valid_display ) 
-		error_popup_widget = XtVaCreatePopupShell(
-			"popup",
-			transientShellWidgetClass,
-			topLevel,
-			XtNcolormap, current_colormap,
-			NULL );
-	else
-		error_popup_widget = XtVaCreatePopupShell(
-			"popup",
-			transientShellWidgetClass,
-			topLevel,
-			NULL );
-
-	error_popupcanvas_widget = XtVaCreateManagedWidget(
-		"error_popupcanvas",
-		formWidgetClass,
-		error_popup_widget,
-		XtNborderWidth, 0,
-		NULL);
-
-	if( ret_string != NULL )
-		error_popupdialog_widget = XtVaCreateManagedWidget(
-			"error_popupdialog",	
-			dialogWidgetClass,	
-			error_popupcanvas_widget,
-			XtNlabel, message,
-			XtNborderWidth, 0,
-			XtNvalue, ret_string,
-			NULL );
-	else
-		error_popupdialog_widget = XtVaCreateManagedWidget(
-			"error_popupdialog",
-			dialogWidgetClass,
-			error_popupcanvas_widget,
-			XtNborderWidth, 0,
-			XtNlabel, message,
-			NULL );
-
-	ok_button_widget = XtVaCreateManagedWidget(
-		"OK",
-		commandWidgetClass,
-		error_popupdialog_widget,
-		NULL);
-
-        XtAddCallback( ok_button_widget,     XtNcallback, 
-				error_popup_callback, (XtPointer)MESSAGE_OK);
-
-	if( want_cancel_button ) {
-		cancel_button_widget = XtVaCreateManagedWidget(
-			"Cancel",
-			commandWidgetClass,
-			error_popupdialog_widget,
-			XtNfromHoriz, ok_button_widget,
-			NULL);
-	        XtAddCallback( cancel_button_widget, XtNcallback,
-				error_popup_callback, (XtPointer)MESSAGE_CANCEL);
-		}
-
-	/* Move the dialog to a reasonable location and pop it up */
-	XtVaGetValues    ( commandcanvas_widget, XtNwidth,  &width, 
-					XtNheight, &height, NULL );
-	XtTranslateCoords( commandcanvas_widget, (Position)width,
-					(Position)height, &root_x, &root_y );
-	XtVaSetValues    ( error_popup_widget, XtNx, root_x/2, XtNy, root_y/2, NULL );
-	XtPopup          ( error_popup_widget, XtGrabExclusive );
-
-	if( options.display_type == PseudoColor )
-		XSetWindowColormap( XtDisplay(topLevel), XtWindow(error_popup_widget), 
-				current_colormap );
-
-	/*
-	XtInstallAccelerators( error_popupdialog_widget, ok_button_widget );
-	*/
-	while( ! error_popup_done ) {
-		XtAppNextEvent( x_app_context, &event );
-		XtDispatchEvent( &event );
-		}
-	error_popup_done = FALSE;
-
-	if( ret_string != NULL )
-		strcpy( ret_string, XawDialogGetValueString( error_popupdialog_widget ));
-	XtPopdown( error_popup_widget );
-
-	if( want_cancel_button )
-		XtDestroyWidget( cancel_button_widget );
-	XtDestroyWidget( ok_button_widget         );
-	XtDestroyWidget( error_popupdialog_widget );
-	XtDestroyWidget( error_popupcanvas_widget );
-	XtDestroyWidget( error_popup_widget       );
-	error_popup_widget = NULL;
-
-	return( error_popup_result );
-}
-
-        void
-error_popup_callback(widget, client_data, call_data)
-Widget widget;
-XtPointer client_data;
-XtPointer call_data;
-{
-	error_popup_result = (int)client_data;
-	error_popup_done   = TRUE;
-}
-
-	void
-x_var_set_sensitive( char *var_name, int sensitivity )
-{
-	Widget 	*w;
-	String 	label;
-	int	i = 0;
-
-	w = varlist_widget;
-	while( w != NULL ) {
-		XtVaGetValues( *w, XtNlabel, &label, NULL );
-		if( strcmp( label, var_name ) == 0 ) {
-			XtVaSetValues( *w, XtNsensitive, sensitivity, NULL );
-			return;
-			}
-		w = (varlist_widget + ++i);
-		}
-
-	fprintf( stderr, "ncview: x_var_set_sensitive: could not find " );
-	fprintf( stderr, "variable widget corrosponding to variable %s\n",
-					var_name );
-	exit( -1 );
-}
-
-	void
-x_fill_dim_info( NCDim *d, int please_flip )
-{
-	Widget	*w;
-	String	widget_name;
-	int	i;
-	char	temp_label[132];
-
-	/* first, find the row we want */
-	i = 0;
-	while( (w = diminfo_name_widget + i) != NULL ) {
-		XtVaGetValues( *w, XtNlabel, &widget_name, NULL );
-		if( strcmp( widget_name, d->name ) == 0 ) {
-
-			if( please_flip )
-				sprintf( temp_label, "%g", d->max );
-			else
-				sprintf( temp_label, "%g", d->min );
-			XtVaSetValues( *(diminfo_min_widget+i),
-				XtNlabel, temp_label,
-				XtNwidth, app_data.dimlabel_width,
-				NULL );
-
-			if( please_flip )
-				sprintf( temp_label, "%g", d->min );
-			else
-				sprintf( temp_label, "%g", d->max );
-			XtVaSetValues( *(diminfo_max_widget+i),
-				XtNlabel, temp_label,
-				XtNwidth, app_data.dimlabel_width,
-				NULL );
-
-			if( d->units == NULL )
-				XtVaSetValues( *(diminfo_units_widget+i),
-					XtNlabel, "-",
-					XtNwidth, app_data.dimlabel_width,
-					NULL );
-			else
-				XtVaSetValues( *(diminfo_units_widget+i),
-					XtNlabel, limit_string(d->units),
-					XtNwidth, app_data.dimlabel_width,
-					NULL );
-
-			return;
-			}
-		i++;
-		}
-
-	fprintf( stderr, "ncview: x_fill_dim_info: error, can't find " );
-	fprintf( stderr, "dim info widget named \"%s\"\n", d->name );
-	exit( -1 );
-}
-
-	void
-x_set_cur_dim_value( char *dim_name, char *string )
-{
-	int	i;
-	Widget	*w;
-	String	label;
-
-	i = 0;
-	while( (w = diminfo_name_widget+i) != NULL ) {
-		XtVaGetValues( *w, XtNlabel, &label, NULL );
-		if( strcmp( label, dim_name ) == 0 ) {
-			XtVaSetValues( *(diminfo_cur_widget+i), 
-				XtNlabel, string, NULL );
-			return;
-			}
-		i++;
-		}
-	fprintf( stderr, "ncview: x_set_cur_dim: error; widget for dimension ");
-	fprintf( stderr, "named \"%s\" not found.\n", dim_name );
-	exit( -1 );
-}
-
-	void
-x_init_dim_info( Stringlist *dims )
-{
-	int	i, n_dims;
-	char	widget_name[128];
-	Dimension bb_width, bb_height;
-
-	XtVaGetValues( labels_row_widget, XtNwidth,  &bb_width,
-					  XtNheight, &bb_height, NULL );
-
-	x_clear_dim_info();
-	n_dims = n_strings_in_list( dims );
-	diminfo_row_widget = (Widget *)malloc( (n_dims+1)*sizeof(Widget));
-	if( diminfo_row_widget == NULL ) {
-		fprintf( stderr, "ncview: x_init_dim_info: malloc failed ");
-		fprintf( stderr, "initializing %d diminfo_row widgets",
-							n_dims );
-		exit( -1 );
-		}
-	diminfo_dim_widget = (Widget *)malloc( (n_dims+1)*sizeof(Widget));
-	if( diminfo_dim_widget == NULL ) {
-		fprintf( stderr, "ncview: x_init_dim_info: malloc failed ");
-		fprintf( stderr, "initializing %d diminfo_dim widgets",
-							n_dims );
-		exit( -1 );
-		}
-	diminfo_name_widget = (Widget *)malloc( (n_dims+1)*sizeof(Widget));
-	if( diminfo_name_widget == NULL ) {
-		fprintf( stderr, "ncview: x_init_dim_info: malloc failed ");
-		fprintf( stderr, "initializing %d diminfo_name widgets",
-							n_dims );
-		exit( -1 );
-		}
-	diminfo_min_widget = (Widget *)malloc( (n_dims+1)*sizeof(Widget));
-	if( diminfo_min_widget == NULL ) {
-		fprintf( stderr, "ncview: x_init_dim_info: malloc failed ");
-		fprintf( stderr, "initializing %d diminfo_min widgets",
-							n_dims );
-		exit( -1 );
-		}
-	diminfo_cur_widget = (Widget *)malloc( (n_dims+1)*sizeof(Widget));
-	if( diminfo_cur_widget == NULL ) {
-		fprintf( stderr, "ncview: x_init_dim_info: malloc failed ");
-		fprintf( stderr, "initializing %d diminfo_cur widgets",
-							n_dims );
-		exit( -1 );
-		}
-	diminfo_max_widget = (Widget *)malloc( (n_dims+1)*sizeof(Widget));
-	if( diminfo_max_widget == NULL ) {
-		fprintf( stderr, "ncview: x_init_dim_info: malloc failed ");
-		fprintf( stderr, "initializing %d diminfo_max widgets",
-							n_dims );
-		exit( -1 );
-		}
-	diminfo_units_widget = (Widget *)malloc( (n_dims+1)*sizeof(Widget));
-	if( diminfo_units_widget == NULL ) {
-		fprintf( stderr, "ncview: x_init_dim_info: malloc failed ");
-		fprintf( stderr, "initializing %d diminfo_units widgets",
-							n_dims );
-		exit( -1 );
-		}
-	/* Mark the end of the arrays by a 'NULL' */
-	*(diminfo_row_widget   + n_dims) = NULL;
-	*(diminfo_dim_widget   + n_dims) = NULL;
-	*(diminfo_name_widget  + n_dims) = NULL;
-	*(diminfo_min_widget   + n_dims) = NULL;
-	*(diminfo_cur_widget   + n_dims) = NULL;
-	*(diminfo_max_widget   + n_dims) = NULL;
-	*(diminfo_units_widget + n_dims) = NULL;
-
-	for( i=0; i<n_dims; i++ )
-		{
-                sprintf( widget_name, "diminfo_row_%1d", i );
-                if( i == 0 )
-			*(diminfo_row_widget+i) = XtVaCreateManagedWidget(
-				widget_name,
-				boxWidgetClass,
-				commandcanvas_widget,
-				XtNorientation, XtorientHorizontal,
-				XtNfromVert, labels_row_widget,
-				XtNheight, bb_height,
-				XtNwidth,  bb_width,
-				NULL);
-		else
-			*(diminfo_row_widget+i) = XtVaCreateManagedWidget(
-				widget_name,
-				boxWidgetClass,
-				commandcanvas_widget,
-				XtNorientation, XtorientHorizontal,
-				XtNfromVert, *(diminfo_row_widget + (i-1)),
-				XtNheight, bb_height,
-				XtNwidth,  bb_width,
-				NULL);
-
-		sprintf( widget_name, "diminfo_dim_%1d", i );
-		*(diminfo_dim_widget+i) = XtVaCreateManagedWidget(
-			widget_name,
-			labelWidgetClass,
-			*(diminfo_row_widget+i),
-			XtNlabel, "",
-			XtNjustify, XtJustifyRight,
-			XtNwidth, 50,
-			XtNborderWidth, 0,
-			NULL);
-
-		sprintf( widget_name, "diminfo_name_%1d", i );
-		*(diminfo_name_widget+i) = XtVaCreateManagedWidget(
-			widget_name,
-			labelWidgetClass,
-			*(diminfo_row_widget+i),
-			XtNlabel, dims->string,
-			XtNwidth, app_data.dimlabel_width,
-			XtNborderWidth, 0,
-			NULL);
-
-		sprintf( widget_name, "diminfo_min_%1d", i );
-		*(diminfo_min_widget+i) = XtVaCreateManagedWidget(
-			widget_name,
-			labelWidgetClass,
-			*(diminfo_row_widget+i),
-			XtNlabel, "Min:",
-			XtNwidth, app_data.dimlabel_width,
-			XtNborderWidth, 0,
-			NULL);
-
-		sprintf( widget_name, "diminfo_cur_%1d", i );
-		*(diminfo_cur_widget+i) = XtVaCreateManagedWidget(
-			widget_name,
-			commandWidgetClass,
-			*(diminfo_row_widget+i),
-			XtNlabel, "Current:",
-			XtNwidth, app_data.dimlabel_width,
-			NULL);
-        	XtAddCallback( *(diminfo_cur_widget+i), XtNcallback, 
-      					diminfo_cur_mod1, (XtPointer)i );
-
-		/* Add the modifications for the created curr_dimension button;
-		 * Button-3 gives mod3 and holding down control gives mod2.
-		 */
-		XtAugmentTranslations( *(diminfo_cur_widget+i), 
-			XtParseTranslationTable( 
-				"<Btn3Down>,<Btn3Up>: diminfo_cur_mod3()" ));
-		/* XtAugmentTranslations( *(diminfo_cur_widget+i),  */
-		XtOverrideTranslations( *(diminfo_cur_widget+i), 
-			XtParseTranslationTable( 
-				"Ctrl<Btn1Down>,<Btn1Up>: diminfo_cur_mod2()" ));
-		XtOverrideTranslations( *(diminfo_cur_widget+i), 
-			XtParseTranslationTable( 
-				"Ctrl<Btn3Down>,<Btn3Up>: diminfo_cur_mod4()" ));
-
-		sprintf( widget_name, "diminfo_max_%1d", i );
-		*(diminfo_max_widget+i) = XtVaCreateManagedWidget(
-			widget_name,
-			labelWidgetClass,
-			*(diminfo_row_widget+i),
-			XtNlabel, "Max:",
-			XtNwidth, app_data.dimlabel_width,
-			XtNborderWidth, 0,
-			NULL);
-
-		sprintf( widget_name, "diminfo_units_%1d", i );
-		*(diminfo_units_widget+i) = XtVaCreateManagedWidget(
-			widget_name,
-			labelWidgetClass,
-			*(diminfo_row_widget+i),
-			XtNlabel, "Units:",
-			XtNwidth, app_data.dimlabel_width,
-			XtNborderWidth, 0,
-			NULL);
-
-		dims = dims->next;
-		}
-}	
-	void
-x_clear_dim_info()
-{
-	Widget	w;
-	int	i;
-
-	if( diminfo_row_widget == NULL )
-		return;
-
-	i=0;
-	while( (w = *(diminfo_row_widget + i++)) != NULL )
-		XtDestroyWidget( w );
-}
-
-	void
-x_set_cursor_busy()
-{
-	if( busy_cursor == (Cursor)NULL )
-		return;
-
-	XDefineCursor( XtDisplay( commandcanvas_widget ),
-	   	    XtWindow( commandcanvas_widget ), busy_cursor );
-
-	
-	if( ccontour_popped_up )
-		XDefineCursor( XtDisplay( ccontour_widget ),
-	   	    XtWindow( ccontour_widget ), busy_cursor );
-
-	if( dimsel_popup_widget != NULL )
-		XDefineCursor( XtDisplay( ccontour_widget ),
-	   	    XtWindow( dimsel_popup_widget ), busy_cursor );
-
-	XFlush( XtDisplay( commandcanvas_widget ));
-}
-
-	void
-x_set_cursor_normal()
-{
-	if( busy_cursor == (Cursor)NULL )
-		return;
-
-	XUndefineCursor( XtDisplay( commandcanvas_widget ),
-	   	    XtWindow( commandcanvas_widget ) );
-
-	if( ccontour_popped_up )
-		XUndefineCursor( XtDisplay( ccontour_widget ),
-	   	    XtWindow( ccontour_widget ) ); 
-
-	if( dimsel_popup_widget != NULL )
-		XUndefineCursor( XtDisplay( ccontour_widget ),
-	   	    XtWindow( dimsel_popup_widget ) );
-
-}
-
-	void
-new_cmaplist( Cmaplist **cml )
-{
-	(*cml) = (Cmaplist *)malloc( sizeof( Cmaplist ) );
-	(*cml)->color_list = (XColor *)malloc( (options.n_colors+N_EXTRA_COLORS)*sizeof(XColor) );
-	(*cml)->next       = NULL;
-	(*cml)->prev       = NULL;
-	(*cml)->name       = NULL;
-	(*cml)->pixel_transform = (ncv_pixel *)malloc( (options.n_colors+N_EXTRA_COLORS)*sizeof(ncv_pixel) );
-}
-
-	void
-x_set_windows_colormap_to_current( Widget w )
-{
-	XSetWindowColormap( XtDisplay(topLevel), XtWindow(w), current_colormap );
-}
-
-	void
-x_get_window_position( int *llx, int *lly, int *urx, int *ury )
-{
-	Dimension	width, height;
-	Position	x, y;
-
-	XtVaGetValues    ( commandcanvas_widget, XtNwidth,  &width, 
-					XtNheight, &height, NULL );
-	XtTranslateCoords( commandcanvas_widget, (Position)width,
-					(Position)height, &x, &y );
-	*urx = (int)x;
-	*ury = (int)y;
-	XtTranslateCoords( commandcanvas_widget, (Position)0,
-					(Position)0, &x, &y );
-	*llx = (int)x;
-	*lly = (int)y;
-}
-
-	void
-pix_to_rgb( ncv_pixel pix,  int *r, int *g, int *b )
-{
-	*r = (current_colormap_list->color_list+pix)->red;
-	*g = (current_colormap_list->color_list+pix)->green;
-	*b = (current_colormap_list->color_list+pix)->blue;
-}
-
-	void
-x_popup_2d_window()
-{
-	Position  root_x, root_y;
-	Dimension width, height;
-	static int 	first_time = 1;
-
-	if( first_time ) {
-		/* Move the ccontourpanel to a reasonable location */
-		XtVaGetValues    ( commandcanvas_widget, XtNwidth,  &width, XtNheight, &height, NULL );
-		XtTranslateCoords( commandcanvas_widget, (Position)1, (Position)height, &root_x, &root_y );
-		XtVaSetValues    ( ccontourpanel_widget, XtNx, root_x, XtNy, root_y, NULL );
-		first_time = 0;
-		}
-
-	XtPopup( ccontourpanel_widget, XtGrabNone );
-
-	ccontour_popped_up = TRUE;
-}
-
-	void
-x_popdown_2d_window()
-{
-	XtPopdown( ccontourpanel_widget );
-	ccontour_popped_up = FALSE;
-}
-
-        void
-expose_ccontour( Widget w, XtPointer client_data, XExposeEvent *event, Boolean *continue_to_dispatch )
-{
-	if( event->type != Expose ) {
-		fprintf( stderr, "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n" );
-		fprintf( stderr, "Got a non-expose event to expose_ccontour!\n" );
-		fprintf( stderr, "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n" );
-		return;
-		}
-
-	if( (event->count == 0) && (event->width > 1) && (event->height > 1))
-		view_draw( TRUE );
-}
-
-	void 	
-varsel_menu_select(Widget w, XtPointer client_data, XtPointer call_data )
-{
-	NCVar 	*var;
-	int 	i, menu_item;
-
-	menu_item = (int)client_data;
-	printf( "picked menu item %d\n", menu_item );
-
-	var = variables;
-	for( i=0; i<menu_item; i++ )
-		var = var->next;
-
-	printf( "picked variable %s\n", var->name );
-	in_variable_selected( var->name );
-}
-
-void 	testf(Widget w, XButtonEvent *e, String *p, Cardinal *n )
-{
-	printf( "in testf!\n" );
-}
-
-	void
-dump_to_ppm( unsigned char *data, size_t width, size_t height )
-{
-	pixel   **temp_array, ppm_pixel;
-	pixval	r, g, b, max;
-	int	i, j, pix;
-	char	filename[2048];
-	static  int frameno=0;
-	FILE	*out_file;
-
-	sprintf( filename, "frame.%06d.ppm", frameno );
-	frameno++;
-
-	if( (out_file = fopen( filename, "w" )) == NULL ) {
-		fprintf( stderr, "can't open file %s for writing\n", filename );
-		return;
-		}
-
-	temp_array = ppm_allocarray(width, height );
-	for( j=0; j<height; j++ )
-	for( i=0; i<width;  i++ ) {
-		pix = *(data+i+j*width);
-		r = (pixval)((current_colormap_list->color_list+pix)->red >> 8);
-		g = (pixval)((current_colormap_list->color_list+pix)->green >> 8);
-		b = (pixval)((current_colormap_list->color_list+pix)->blue >> 8);
-/*
-printf( "%d ", pix);
-printf( "(%d %d %d %d) ", (int)pix, (int)(current_colormap_list->color_list+pix)->red, (int)(current_colormap_list->color_list+pix)->green, (int)(current_colormap_list->color_list+pix)->blue );
-*/
-		PPM_ASSIGN( ppm_pixel, r, g, b );
-		*(temp_array[j]+i) = ppm_pixel;
-		}	
-
-	max = PPM_MAXMAXVAL;
-	ppm_writeppm( out_file, temp_array, width, height, max, FALSE );
-
-	fclose(out_file);
-	ppm_freearray( temp_array, height );
-}
-
diff --git a/src/ncview b/src/ncview
deleted file mode 100755
index cf194a6..0000000
Binary files a/src/ncview and /dev/null differ
diff --git a/src/ncview.c b/src/ncview.c
index d5976b8..5cc4bd4 100644
--- a/src/ncview.c
+++ b/src/ncview.c
@@ -26,6 +26,20 @@
 #include "ncview.protos.h"
 
 /* These hold data for our colormaps */
+
+/* A. Shchepetkin: new colormaps are added here */
+#include "colormaps_bright.h"
+#include "colormaps_banded.h"
+#include "colormaps_rainbow.h"
+#include "colormaps_jaisnb.h"
+#include "colormaps_jaisnc.h"
+#include "colormaps_jaisnd.h"
+#include "colormaps_blu_red.h"
+#include "colormaps_manga.h"
+#include "colormaps_jet.h"
+#include "colormaps_wheel.h"
+
+/* the following are original colormaps from ncview */
 #include "colormaps_3gauss.h"
 #include "colormaps_3saw.h"
 #include "colormaps_bw.h"
@@ -56,6 +70,7 @@ Options	  options;
 NCVar	  *variables;
 ncv_pixel *pixel_transform;
 FrameStore framestore;
+Stringlist *read_in_state;
 
 static void init_cmaps_from_data();
 static void init_cmap_from_data( char *colormap_name, int *data );
@@ -67,7 +82,11 @@ main( int argc, char **argv )
 {
 	Stringlist *input_files;
 
-	initialize_misc             ();
+	/* Initialize misc constants, AND read in the previous
+	 * run's saved state file
+	 */
+	initialize_misc();
+
 	in_parse_args               ( &argc, argv );
 	input_files = parse_options ( argc,  argv );
 	determine_file_type         ( input_files );
@@ -83,6 +102,7 @@ main( int argc, char **argv )
 		exit( -1 );
 		}
 
+	/* This initializes the colormaps, and then the X widows system */
 	initialize_display_interface(); 
 	print_init();
 	overlay_init();
@@ -279,7 +299,7 @@ parse_options( int argc, char *argv[] )
 				}
 			}
 		else /* found an entry which is NOT in option syntax -- assume a filename */
-			add_to_stringlist( &file_list, argv[i], NULL );
+			stringlist_add_string( &file_list, argv[i], NULL, SLTYPE_NULL );
 		} /* end of i loop through argv's */
 
 	return( file_list );
@@ -289,6 +309,8 @@ parse_options( int argc, char *argv[] )
 	void
 initialize_misc()
 {
+	int	err;
+
 	print_disclaimer();
 
 	udu_utinit( NULL );
@@ -299,6 +321,7 @@ initialize_misc()
 	options.min_max_method   = DEFAULT_MIN_MAX_METHOD;
 	options.transform        = TRANSFORM_NONE;
 	options.n_colors 	 = DEFAULT_N_COLORS;
+	options.n_extra_colors 	 = 10;
 	options.private_colormap = DEFAULT_PRIVATE_CMAP;
 	options.debug		 = FALSE;
 	options.show_sel	 = FALSE;
@@ -325,6 +348,13 @@ initialize_misc()
 
 	framestore.frame = NULL;
 	framestore.valid = FALSE;
+
+	/* Read in our state file from a previous run of ncview 
+	 */
+	read_in_state = NULL;	/* flag to make a new stringlist */
+	err = read_state_from_file( &read_in_state );
+	if( err < 0 ) 	
+		printf( "Note: trying to read in the ncview initialization file $HOME/.ncviewrc resulted in error %d\n", err );
 }
 
 /***********************************************************************************************/
@@ -403,6 +433,22 @@ get_cmaps_from_dir( char *dir_name )
 	void
 init_cmaps_from_data()
 {
+
+/* A. Shchepetkin: new colormaps are added here */
+
+        init_cmap_from_data( "bright",  cmap_bright  );
+        init_cmap_from_data( "banded",  cmap_banded  );
+        init_cmap_from_data( "rainbow", cmap_rainbow );
+        init_cmap_from_data( "jaisnb",  cmap_jaisnb  );
+        init_cmap_from_data( "jaisnc",  cmap_jaisnc  );
+        init_cmap_from_data( "jaisnd",  cmap_jaisnd  );
+        init_cmap_from_data( "blu_red", cmap_blu_red );
+        init_cmap_from_data( "manga",   cmap_manga   );
+        init_cmap_from_data( "jet",     cmap_jet     );
+        init_cmap_from_data( "wheel",   cmap_wheel   );
+
+/* the following are original colormaps from ncview */
+
 	init_cmap_from_data( "3gauss",  cmap_3gauss  );
 	init_cmap_from_data( "3saw",    cmap_3saw    );
 	init_cmap_from_data( "bw",      cmap_bw      );
@@ -522,7 +568,7 @@ initialize_file_interface( Stringlist *input_files )
 	int	idim, nvars, nfiles;
 	NCVar	*var;
 
-	nfiles = n_strings_in_list( input_files );
+	nfiles = stringlist_len( input_files );
 
 	while( input_files != NULL ) {
 		fi_initialize( input_files->string, nfiles );
@@ -550,6 +596,12 @@ initialize_file_interface( Stringlist *input_files )
 		var = var->next;
 		}
 
+	/* Now that we have read in all the files, we can
+	 * gather any scalar coordinate information (which
+	 * might possibly change in each file)
+	 */
+	cache_scalar_coord_info( variables );
+
 	if( nvars > options.listsel_max )
 		options.varsel_style = VARSEL_MENU;
 }
@@ -559,7 +611,13 @@ initialize_file_interface( Stringlist *input_files )
 initialize_display_interface()
 {
 	initialize_colormaps();
-	in_initialize       ();
+
+	/* Make the colormaps in the program congruent in order
+	 * and "enabled-ness" with the read-in state
+	 */
+	x_check_legal_colormap_loaded();
+
+	in_initialize();
 }
 
 /***********************************************************************************************/
@@ -618,7 +676,7 @@ fprintf( stderr, "		values in the data files will be determined;\n" );
 fprintf( stderr, "		by scanning every third time entry (\"-minmax fast\"),\n" );
 fprintf( stderr, "		every fifth time entry (\"-minmax med\"), every tenth\n" );
 fprintf( stderr, "		(\"-minmax slow\"), or all entries (\"-minmax all\").\n" );
-fprintf( stderr, "	-frames: Dump out PPM images (to make a movie, for instance)\n" );
+fprintf( stderr, "	-frames: Dump out PNG images (to make a movie, for instance)\n" );
 fprintf( stderr, "	-nc: 	Specify number of colors to use.\n" );
 fprintf( stderr, "	-no1d: 	Do NOT allow 1-D variables to be displayed.\n" );
 fprintf( stderr, "	-calendar: Specify time calendar to use, overriding value in file. Known: noleap standard gregorian 365_day 360_day.\n" );
@@ -655,7 +713,7 @@ print_disclaimer()
 {
 fprintf( stderr, "%s\n", PROGRAM_ID );
 fprintf( stderr, "http://meteora.ucsd.edu:80/~pierce/ncview_home_page.html\n" );
-fprintf( stderr, "Copyright (C) 1993 through 2010, David W. Pierce\n" );
+fprintf( stderr, "Copyright (C) 1993 through 2011, David W. Pierce\n" );
 fprintf( stderr, "Ncview comes with ABSOLUTELY NO WARRANTY; for details type `ncview -w'.\n" );
 fprintf( stderr, "This is free software licensed under the Gnu General Public License version 3; type `ncview -c' for redistribution details.\n\n" );
 }
diff --git a/src/ncview.defines.h b/src/ncview.defines.h
index 57ccf1b..a21dc9b 100644
--- a/src/ncview.defines.h
+++ b/src/ncview.defines.h
@@ -31,8 +31,8 @@
 #include <udunits2.h>
 #endif
 
-#define PROGRAM_ID	"Ncview 2.0beta4 David W. Pierce  3 March 2010"
-#define PROGRAM_VERSION 2.0
+#define PROGRAM_ID	"Ncview 2.1 David W. Pierce  19 July 2011"
+#define PROGRAM_VERSION 2.1
 #define APP_RES_VERSION 1.93
 
 #ifndef TRUE
@@ -88,6 +88,7 @@
 #define LABEL_3			3
 #define LABEL_4			4
 #define LABEL_5			11
+#define LABEL_6			13
 /* Specific purpose writable labels in the user interface. */
 #define LABEL_COLORMAP_NAME	5		/* this is also a button */
 #define LABEL_BLOWUP		6		/* this is also a button */
@@ -102,6 +103,7 @@
 #define LABEL_SCAN_PLACE	LABEL_3
 #define LABEL_DATA_EXTREMA	LABEL_4
 #define LABEL_DATA_VALUE	LABEL_5
+#define LABEL_SCALAR_DIMS	LABEL_6		/* information from the scalar dims */
 
 /*****************************************************************************/
 /* Transforming the data before turning it into pixels is supported */
@@ -242,6 +244,12 @@
 #define TGRAN_YEAR	6
 
 /*******************************************************************
+ * Maximum number of scalar "coord" attributes we can have for
+ * variable.
+ */
+#define MAX_SCALAR_COORDS	20
+
+/*******************************************************************
  *
  * 	The main concept here is the 'variable'.  Variables are
  *	things which might possibly be displayed by ncview.  Variables
@@ -265,19 +273,12 @@ typedef unsigned char ncv_pixel;/* If you change this, make sure to change
 				 */
 
 /*****************************************************************************/
-/* A general purpose list of character strings */
-typedef struct {
-	char	*string;
-	void	*next, *prev;
-	int	index;		/* initialized to position in list */
-	void	*aux;		/* auxilliary data */
-} Stringlist;
-
-/*****************************************************************************/
 /* This describes the file which the relevant variable lives in */
 typedef struct {
 	void	*next, *prev;
 	int	id;		/* internally used ID number */
+	int	index;		/* starts at 0, increments by 1 for each file associated
+				 * with this variable */
 	char	*filename;
 	void	*aux_data;	/* For specific datafile implementations */
 	size_t	*var_size;	/* Multi-dimensional size of variables which live in this file */
@@ -291,7 +292,7 @@ typedef struct {
 	 */
 	char	*recdim_units;
 #ifdef HAVE_UDUNITS2
-	ut_unit	*udunits;	/* only non-null if ut_parse worked on these units */
+	ut_unit	*ut_unit_ptr;	/* only non-null if ut_parse worked on these units */
 #endif
 } FDBlist;	
 
@@ -345,10 +346,12 @@ typedef struct {
 	char	*coord_att;		/* Contents of the "coordinates" attribute */
 	char	*coord_var_name;	/* Name of the VAR in the file that holds mapping info */
 	int	coord_var_ndims;	/* # of dims in the mapping var */
+	char	*coord_var_units;	/* if the coord var has a units att, this records it */
 	size_t	*coord_var_size;	/* size of the mapping var (MULTIDIMENSIONAL) */
 	int	*matching_var_dims;	/* This has n_dims equal to the DATA VARIABLE, NOT the coord var! */
 	float	*data_cache;		/* Cached info from the mapping var */
 	size_t	*index_place_factor;	/* Array of size var_i_map->n_dims, is 0 or factor to mult loc by */
+	int	scalar_all_same;	/* ==1 iff is a scalar coord var AND all vals are identical; ==0 otherwise */
 	
 } NCDim_map_info;
 
@@ -371,6 +374,26 @@ typedef struct {
 						 */
 	int	n_dims;				/* how many dimensions this var has */
 	FDBlist	*first_file, *last_file;	/* What files this variable lives in */
+	int	is_virtual;			/* Boolean -- true if this var lives
+						 * in more than one input file, false
+						 * otherwise.
+						 */
+	FDBlist **timestep_2_fdb;		/* Files can only be virtually concatenated
+	  					 * along the first (timelike) dimension.
+						 * This gives pointers to the FDBlist 
+						 * elements that each individual timestep
+						 * of the var lives in. So it is dimension
+						 * size[0]. Note that many entries can 
+						 * point to the same target. For example,
+						 * if a sequency of data files with a year's
+						 * worth of monthly data is given, then
+						 * the first 12 entries of this will all
+						 * point to the first file's FDBlist.
+						 * Because this can only be filled out
+						 * AFTER we have processed all the files,
+						 * it is done in a slighly strange place...
+						 * in routine cache_scalar_coord_info.
+						 */
 	float	global_min, global_max,		/* These are diffferent from the */
 	        user_min, user_max;	 	/* min & max in the FDBs because these
 					 	* are global, rather than local to
@@ -392,7 +415,7 @@ typedef struct {
 	 					 * a NULL is inserted instead.
 	 					 */
 	NCDim_map_info	**dim_map_info;		/* Pointer to the first entry in an
-						   array of NCDim_map_info pointers
+						   array of ndims NCDim_map_info pointers
 						   that hold information describing
 						   the 2-D mapping for this dim. 
 						   This itself should never be null,
@@ -404,10 +427,26 @@ typedef struct {
 						   dim, which is an oddity of the
 						   way CF conventions handle mapping.
 						 */
-	int	is_virtual;			/* Boolean -- true if this var lives
-						 * in more than one input file, false
-						 * otherwise.
-						 */
+	NCDim_map_info **scalar_dim_map_info; 	/* A variable can also
+						   specify SCALAR coordinate "vars",
+						   for example, "height" for a 2d
+						   field in (lon,lat). This holds
+						   the scalar info. The reason this
+						   is not part of athe dim_map_info
+						   array is that array has exactly
+						   ndims entries, describing how 
+						   each dim in the var is mapped. 
+						   This array can have many more
+						   scalar "dims", locating the field
+						   in space or time. They are really
+						   different concepts but the CF
+						   convention puts them both in
+						   the "coordinates" attribute.
+						   */
+	int	n_scalar_coords;		/* Number of valid entries in the
+						   'scalar_dim_map_info' array for
+						   this var.
+						*/
 } NCVar;
 
 /*****************************************************************************/
@@ -459,6 +498,7 @@ typedef struct {
 		private_colormap,
 		want_extra_info,
 		n_colors,
+		n_extra_colors,	/* Supposedly for black, white, etc., but not used much nowadays */
 		small,
 		dump_frames,
 		no_1d_vars,
@@ -495,6 +535,7 @@ typedef struct {
 	OverlayOptions *overlay;
 } Options;
 
+/***********************************************************************************************************/
 /* Postscript printer output options */
 typedef struct {
 	float	page_width, page_height,		/* In inches */
@@ -514,3 +555,40 @@ typedef struct {
 		test_only;
 } PrintOptions;
 
+/*******************************************************************************************/
+/* This is used to hold key info about the X server,
+ * which we use when we try to create an image.
+ */
+#define ORDER_RGB       1       /* R mask > B mask */
+#define ORDER_BGR       2       /* B mask > R mask */
+typedef struct {
+        int     bits_per_pixel,
+                byte_order,
+                bytes_per_pixel,
+                bitmap_unit,
+                bitmap_pad,
+                rgb_order,
+                shift_red,
+                shift_green_upper, shift_green_lower,
+                shift_blue,
+                depth,
+                width,
+                height;
+        unsigned long   mask_red,
+                mask_green_upper, mask_green_lower,
+                mask_blue;
+} Server_Info;
+
+/*****************************************************************************************************/
+/* This structure holds information about MY list of colormaps (as opposed to standard X window
+ * colormaps).
+ */
+typedef struct {
+        XColor          *color_list;
+	void            *next, *prev;
+	char            *name;
+	ncv_pixel       *pixel_transform;
+	int             enabled;        /* 1 if enabled, 0 otherwise */
+	int		magic;		/* is CMAPLIST_MAGIC if valid, CMAPLIST_BAD_MAGIC if freed */
+} Cmaplist;
+
diff --git a/src/ncview.includes.h b/src/ncview.includes.h
index 0e5ec4f..c40684c 100644
--- a/src/ncview.includes.h
+++ b/src/ncview.includes.h
@@ -68,3 +68,6 @@
 #include "netcdf.h"
 
 #include "../config.h"
+
+#include "stringlist.h"
+
diff --git a/src/ncview.o b/src/ncview.o
deleted file mode 100644
index fc05bd1..0000000
Binary files a/src/ncview.o and /dev/null differ
diff --git a/src/ncview.protos.h b/src/ncview.protos.h
index 6986a2c..a839c30 100644
--- a/src/ncview.protos.h
+++ b/src/ncview.protos.h
@@ -20,6 +20,8 @@
  * San Diego, CA  92122
  */
 
+#include "stringlist.h"
+
 /******************************************************************************
  * in ncview.c 
  */
@@ -105,16 +107,14 @@ void 	netcdf_fill_value	( int file_id, char *var_name, float *v, NetCDFOptions *
 int 	netcdf_fi_recdim_id     ( int fileid );
 int 	netcdf_dimvar_bounds_id ( int fileid, char *dim_name, int *nvertices );
 char 	*netcdf_dim_calendar( int fileid, char *dim_name );
+int 	safe_ncvarid( int fileid, char *varname );
 
 /******************************************************************************
  * in util.c, general utility routines
  */
-Stringlist *add_to_stringlist  ( Stringlist **list, char *new_string, void *aux );
-void 	new_stringlist     ( Stringlist **el );
 int 	close_enough	   ( float data, float fill );
 void 	new_fdblist        ( FDBlist **el );
 void 	new_netcdf         ( NetCDFOptions **n );
-void	dump_stringlist    ( Stringlist *s );
 int	data_to_pixels     ( View *v );
 void	add_var_to_list    ( char *var_name, int file_id, char *filename, int nfiles );
 NCVar	*get_var	   ( char *var_name );
@@ -123,7 +123,7 @@ void	init_min_max	   ( NCVar *var );
 void	clip_f		   ( float *val, float min, float max );
 void	clip_i		   ( int   *val, int   min, int   max );
 void 	fill_dim_structs   ( NCVar *v );
-void 	expand_data	   ( float *big_data, View *v );
+void 	expand_data	   ( float *big_data, View *v, size_t array_size );
 void 	check_ranges       ( NCVar *var );
 char 	*limit_string	   ( char *s );
 int 	*gen_overlay       ( View *v, char *overlay_fname );
@@ -138,9 +138,9 @@ void 	calc_dim_minmaxes   ( void );
 void    add_vars_to_list    ( Stringlist *var_list, int id, char *filename, int nfiles );
 int     is_scannable        ( NCVar *v, int i );
 void 	sl_cat		    ( Stringlist **dest, Stringlist **src );
-Stringlist *add_to_stringlist_ordered( Stringlist **list, char *new_string, void *aux );
 void 	get_min_max_onestep( NCVar *var, size_t n_other, size_t tstep, float *data, 
 					float *min, float *max, int verbose );
+void 	cache_scalar_coord_info( NCVar *vars );
 
 /******************************************************************************
  * in interface.c 
@@ -228,11 +228,8 @@ void	x_draw_2d_field		( unsigned char *data, size_t width, size_t height,
 void	x_set_2d_size 		( size_t width, size_t height );
 void    x_indicate_active_var   ( char *var_name );
 void    *x_create_default_colormap( void );
-char	*x_change_colormap	( int delta, int do_widgets_flag );
 void 	x_add_to_cmap_list	( char *name, Colormap new_colormap );
-int 	x_seen_colormap_name	( char *name );
 void	x_set_sensitive		( int button_id, int state );
-void	x_create_colormap     	( char *name, ncv_pixel r[256], ncv_pixel g[256], ncv_pixel b[256] );
 void	x_clear_dim_buttons   	( void );
 void 	x_make_dim_buttons    	( Stringlist *dim_list );
 void 	x_var_set_sensitive     ( char *var_name, int sensitivity );
@@ -395,3 +392,32 @@ int  cbar_info( unsigned char **data, int *width, int *height );
 void cbar_make( int width, int height, int n_extra_colors, float user_min, float user_max, int transform );
 char *cbar_data();
 
+/******************************************************************************
+ * in interface/make_tc_data.c
+ */
+void make_tc_data( unsigned char *data, long width, long height, XColor *color_list, unsigned char *tc_data );
+
+/******************************************************************************
+ * in interface/colormap_funcs.c
+ */
+Cmaplist *dup_whole_cmaplist( Cmaplist *src_list );
+int 	x_seen_colormap_name( char *name );
+void 	x_colormap_info( Cmaplist *cmlist, int idx, char **name, int *enabled, XColor **color_list );
+int 	x_n_colormaps( Cmaplist *cmlist );
+void 	x_create_colormap( char *name, unsigned char r[256], unsigned char g[256], unsigned char b[256] );
+char 	*x_change_colormap( int delta, int do_widgets_flag );
+void 	x_check_legal_colormap_loaded();
+void 	delete_cmaplist( Cmaplist *cml );
+int 	colormap_options_to_stringlist( Stringlist **sl );
+
+/******************************************************************************
+ * in handle_rc_file.c
+ */
+int 	write_state_to_file( Stringlist *state_to_save );
+int 	read_state_from_file( Stringlist **state );
+
+/******************************************************************************
+ * in file interface/util.c
+ */
+unsigned char interp( int i, int range_i, unsigned char *mat, int n_entries );
+
diff --git a/src/overlay.c b/src/overlay.c
index 22ea214..5af6c89 100644
--- a/src/overlay.c
+++ b/src/overlay.c
@@ -187,13 +187,11 @@ gen_overlay_internal_mapped( View *v, float *data, long nvals, int *overlay )
 {
 	NCDim	*dim_x, *dim_y;
 	size_t	ii, jj, kk, x_size, y_size, cursor_place[MAX_NC_DIMS];
-	float	x, y, dx, dy, *dimval_x_2d, *dimval_y_2d;
+	float	x, y, *dimval_x_2d, *dimval_y_2d;
 	nc_type	dimval_type;
-	double	tval, bnds_min, bnds_max, dist;
+	double	tval, bnds_min, bnds_max;
 	char	cval[1024];
 	int	has_bnds;
-	double	*mindist2;
-	size_t	*mini, *minj;
 
 	dim_x = *(v->variable->dim + v->x_axis_id);
 	dim_y = *(v->variable->dim + v->y_axis_id);
@@ -262,11 +260,10 @@ gen_overlay_internal_mapped( View *v, float *data, long nvals, int *overlay )
 gen_overlay_internal( View *v, float *data, long nvals )
 {
 	NCDim	*dim_x, *dim_y;
-	size_t	x_size, y_size, ii, jj;
+	size_t	x_size, y_size, ii;
 	int	*overlay, x_is_mapped, y_is_mapped;
 	float	x, y;
 	long	i, j;
-	double	dx, dy;
 
 	dim_x = *(v->variable->dim + v->x_axis_id);
 	dim_y = *(v->variable->dim + v->y_axis_id);
@@ -477,7 +474,7 @@ overlay_find_closest_pt_inner( size_t point_number, size_t init_guess_idxx, size
 {
 	float	dist[9], dx, dy, mindist, tdist[9], prev_d4;
 	long	i, j, nsteps, xx;
-	long	have_calc[9], index, minloc, ox, oy, isrc, jsrc, idest, jdest, idx_src, idx_dest, debug;
+	long	have_calc[9], index, minloc, ox, oy, isrc, jsrc, idx_src, idx_dest, debug;
 	long	curx, cury, i2use, j2use, i0, j0;
 	int	n_wrapped_x, n_wrapped_y;
 	
@@ -551,7 +548,7 @@ overlay_find_closest_pt_inner( size_t point_number, size_t init_guess_idxx, size
 			}
 
 		if( debug ) {
-			printf( "cur loc=(%ld,%ld)  minloc=%d\n", curx, cury, minloc );
+			printf( "cur loc=(%ld,%ld)  minloc=%ld\n", curx, cury, minloc );
 			for( j=2; j>=0; j-- ) {
 				for( i=0; i<3; i++ ) {
 					index = i + (2-j)*3;
@@ -589,7 +586,7 @@ overlay_find_closest_pt_inner( size_t point_number, size_t init_guess_idxx, size
 			case 7: ox=0;  oy=-1; break;
 			case 8: ox=1;  oy=-1; break;
 			default:
-				fprintf( stderr, "coding error in overlay.c, minloc=%d\n", minloc );
+				fprintf( stderr, "coding error in overlay.c, minloc=%ld\n", minloc );
 				exit(-1);
 			}
 
diff --git a/src/overlay.o b/src/overlay.o
deleted file mode 100644
index 716522d..0000000
Binary files a/src/overlay.o and /dev/null differ
diff --git a/src/plot_range.o b/src/plot_range.o
deleted file mode 100644
index 35913c1..0000000
Binary files a/src/plot_range.o and /dev/null differ
diff --git a/src/plot_xy.o b/src/plot_xy.o
deleted file mode 100644
index 57dbe41..0000000
Binary files a/src/plot_xy.o and /dev/null differ
diff --git a/src/printer_options.o b/src/printer_options.o
deleted file mode 100644
index 6206ce8..0000000
Binary files a/src/printer_options.o and /dev/null differ
diff --git a/src/range.o b/src/range.o
deleted file mode 100644
index 6b383f4..0000000
Binary files a/src/range.o and /dev/null differ
diff --git a/src/set_options.o b/src/set_options.o
deleted file mode 100644
index 59ae6d2..0000000
Binary files a/src/set_options.o and /dev/null differ
diff --git a/src/stringlist.c b/src/stringlist.c
new file mode 100644
index 0000000..a2031d1
--- /dev/null
+++ b/src/stringlist.c
@@ -0,0 +1,1206 @@
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <ctype.h>
+
+#define my_isblank( a ) (isspace(a) || ((a) == '\t'))
+
+#include "stringlist.h"
+
+static int stringlist_write_single_element_to_file( Stringlist *sl, FILE *fout );
+static char *stringlist_escape_string( char *ss );
+static char *stringlist_unescape_string( char *ss );
+static int stringlist_delete_single_element_inner( Stringlist *sl );
+static int stringlist_copy_aux( Stringlist *new_el, void *aux, int sltype );
+static int stringlist_add_string_common( Stringlist **list, Stringlist **new_el, char *new_string, void *aux, int sltype );
+static int stringlist_new_sl( Stringlist **el );
+static int stringlist_check_args( Stringlist **list, char *new_string, void *aux, int sltype );
+static int stringlist_copy_name( Stringlist *new_el, char *new_string );
+static int stringlist_get_tok_indices( char *line, int *index0, int *index1, int *string0, int *string1, 
+		int *aux_type0, int *aux_type1, int *aux_val0, int *aux_val1 );
+static int stringlist_line_to_sl( char *line, int lineno, Stringlist **sl );
+static int stringlist_read_from_file_v1( Stringlist **sl, FILE *fin, int nlines_in_header, int debug );
+
+/**************************************************************************************
+ * Given a stringlist and a string, this returns a pointer to the element on the
+ * stringlist that matches the string, or NULL if there is no match.
+ */
+	Stringlist *
+stringlist_match_string_exact( Stringlist *list, char *str )
+{
+	Stringlist	*cursor;
+
+	if( str == NULL )
+		return( NULL );
+
+	cursor = list;
+	while( cursor != NULL ) {
+		if( strcmp( cursor->string, str ) == 0 ) 
+			return( cursor );
+		cursor = cursor->next;
+		}
+
+	return( NULL );
+}
+
+/**************************************************************************************
+ * Adds the given string and auxilliary data to the list.
+ * The first time this is called, assuming you want to make a new stringlist, pass
+ * with *list == NULL. This will make a new stringlist with the passed string (and 
+ * aux info) as the first element of the new string.
+ * Returns 0 on success, -1 on error (usually inability to allocate memory)
+ */
+	int
+stringlist_add_string( Stringlist **list, char *new_string, void *aux, int sltype )
+{
+	Stringlist 	*cursor, *new_el;
+	int		i, err;
+
+	/* Housekeeping tasks that are in common with the ordered version of this routine */
+	if( (err = stringlist_add_string_common( list, &new_el, new_string, aux, sltype )) != 0 ) {
+		fprintf( stderr, "stringlist_add_string: returning due to error\n" );
+		return( -1 );
+		}
+
+	i = 0;
+	if( *list == NULL ) {
+		*list = new_el;
+		new_el->prev = NULL;
+		}
+	else
+		{
+		i = 1;
+		cursor = *list;
+		while( cursor->next != NULL ) {
+			if( cursor->magic != SL_MAGIC ) {
+				if( cursor->magic == SL_BAD_MAGIC ) {
+					fprintf( stderr, "stringlist: Error in stringlist_add_string: trying to use a previously deleted stringlist element (bad magic number)\n" );
+					return( -25 );
+					}
+				fprintf( stderr, "stringlist: Error in stringlist_add_string: found a corrupt or malformed stringlist element on the stringlist (bad magic number)\n" );
+				return( -26 );
+				}
+			cursor = cursor->next;
+			i++;
+			}
+		if( cursor->magic != SL_MAGIC ) {
+			if( cursor->magic == SL_BAD_MAGIC ) {
+				fprintf( stderr, "stringlist: Error in stringlist_add_string: trying to use a previously deleted stringlist element (bad magic number)\n" );
+				return( -25 );
+				}
+			fprintf( stderr, "stringlist: Error in stringlist_add_string: found a corrupt or malformed stringlist element on the stringlist (bad magic number)\n" );
+			return( -26 );
+			}
+		cursor->next = new_el;
+		new_el->prev = cursor;
+		}
+	new_el->index = i;
+
+	return( 0 );
+}
+
+/*******************************************************************************
+ * Adds the given string to the list, and returns a pointer to the 
+ * new list element, with alphabetic ordering.
+ * was: add_to_stringlist_ordered
+ * Returns 0 on success, -1 on error (usually inability to allocate memory)
+ */
+	int
+stringlist_add_string_ordered( Stringlist **list, char *new_string, void *aux, int sltype )
+{
+	Stringlist 	*cursor, *new_el, *prev_el;
+	int		i, err;
+
+	/* Housekeeping tasks that are in common with the unordered version of this routine */
+	if( (err = stringlist_add_string_common( list, &new_el, new_string, aux, sltype )) != 0 ) {
+		fprintf( stderr, "stringlist_add_string: returning due to error\n" );
+		return( -1 );
+		}
+
+	i = 0;
+	if( *list == NULL ) {
+		*list = new_el;
+		new_el->prev = NULL;
+		}
+	else
+		{
+		i = 1;
+		cursor = *list;
+		prev_el = NULL;
+		while( (cursor != NULL) && (strcmp( new_string, cursor->string) > 0)) {
+			if( cursor->magic != SL_MAGIC ) {
+				if( cursor->magic == SL_BAD_MAGIC ) {
+					fprintf( stderr, "stringlist: Error in stringlist_add_string: trying to use a previously deleted stringlist element (bad magic number)\n" );
+					return( -25 );
+					}
+				fprintf( stderr, "stringlist: Error in stringlist_add_string: found a corrupt or malformed stringlist element on the stringlist (bad magic number)\n" );
+				return( -26 );
+				}
+			prev_el = cursor;
+			cursor  = cursor->next;
+			i++;
+			}
+		if( cursor == NULL ) {
+			prev_el->next = new_el;
+			new_el->prev  = prev_el;
+			}
+		else if( prev_el == NULL ) {
+			*list = new_el;
+			new_el->next = cursor;
+			cursor->prev = new_el;
+			}
+		else
+			{
+			new_el->next = cursor;
+			cursor->prev = new_el;
+			prev_el->next = new_el;
+			new_el->prev  = prev_el;
+			}
+		}
+	new_el->index = i;
+
+	return( 0 );
+}
+		
+/**************************************************************************************
+ * Allocates space in the stringlist element for the auxilliary data, and copies it over
+ * Returns 0 on success, -1 on error (usually inability to allocate memory)
+ */
+	static int
+stringlist_copy_aux( Stringlist *new_el, void *aux, int sltype )
+{
+	int	slen;
+
+	if( new_el == NULL ) {
+		fprintf( stderr, "stringlist: Error, stringlist_copy_aux called with a null element\n" );
+		return( -4 );
+		}
+	if( new_el->magic != SL_MAGIC ) {
+		if( new_el->magic == SL_BAD_MAGIC ) {
+			fprintf( stderr, "stringlist: Error in stringlist_copy_aux: trying to use a previously deleted stringlist element (bad magic number)\n" );
+			return( -15 );
+			}
+		fprintf( stderr, "stringlist: Error in stringlist_copy_aux: passed a corrupt or malformed stringlist element (bad magic number)\n" );
+		return( -5 );
+		}
+
+	new_el->sltype = sltype;
+
+	if( sltype == SLTYPE_NULL )
+		return(0);	/* Note: new elements are initialized with aux==NULL and sltype==NULL */
+
+	if( aux == NULL ) 
+		return(0);	/* Note: new elements are initialized with aux==NULL and sltype==NULL */
+
+	switch( sltype ) {
+
+		case SLTYPE_INT:
+			new_el->aux = (void *)malloc( sizeof(int) );
+			if( new_el->aux == NULL ) {
+				fprintf( stderr, "stringlist_copy_aux: failed to allocate a single int\n" );
+				return(-1);
+				}
+			*((int *)new_el->aux) = *((int *)aux);
+			break;
+
+		case SLTYPE_STRING:
+			slen = strlen( (char *)aux );
+			if( slen > STRINGLIST_MAX_LEN ) {
+				fprintf( stderr, "stringlist_copy_aux: error, passed string is too long! Max allowed: %d\n", 
+					STRINGLIST_MAX_LEN );
+				return( -2 );
+				}
+			new_el->aux = (void *)malloc( sizeof(char)*(slen + 1) );
+			if( new_el->aux == NULL ) {
+				fprintf( stderr, "stringlist_copy_aux: failed to allocate a string of length %d\n", slen+1 );
+				return(-1);
+				}
+			strcpy( (char *)(new_el->aux), (char *)aux );
+			break;
+
+		case SLTYPE_FLOAT:
+			new_el->aux = (void *)malloc( sizeof(float) );
+			if( new_el->aux == NULL ) {
+				fprintf( stderr, "stringlist_copy_aux: failed to allocate a single float\n" );
+				return(-1);
+				}
+			*((float *)new_el->aux) = *((float *)aux);
+			break;
+
+		case SLTYPE_BOOL:
+			new_el->aux = (void *)malloc( sizeof(int) );
+			if( new_el->aux == NULL ) {
+				fprintf( stderr, "stringlist_copy_aux: failed to allocate a single int\n" );
+				return(-1);
+				}
+			if( *((int *)aux) == 1 )
+				*((int *)new_el->aux) = 1;
+			else
+				*((int *)new_el->aux) = 0;
+			break;
+
+		default:
+			printf ("ERROR, unknown sltype in stringlist_copy_aux: %d\n", sltype );
+		}
+
+	return( 0 );
+}
+
+/**************************************************************************************
+ * Common prologue code for stringlist_add_string and stringlist_add_string_ordered
+ * Returns 0 on success, -1 on error (usually inability to allocate memory)
+ */
+	static int
+stringlist_add_string_common( Stringlist **list, Stringlist **new_el, char *new_string, void *aux, int sltype )
+{
+	int	err;
+
+	/* Check input args */
+	if( (err = stringlist_check_args( list, new_string, aux, sltype )) != 0 ) {
+		fprintf( stderr, "stringlist_add_string: error, bad arguments passed\n" );
+		return(err);
+		}
+
+	/* Make new stringlist element */
+	if( (err = stringlist_new_sl( new_el )) < 0 ) 
+		return( err );
+
+	/* Copy name over to new element */
+	if( (err = stringlist_copy_name( *new_el, new_string )) != 0 ) {
+		fprintf( stderr, "stringlist_add_string: error encountered when copying name to new element\n" );
+		return(err);
+		}
+
+	/* Copy aux data to new element */
+	if( (err = stringlist_copy_aux( *new_el, aux, sltype )) != 0 ) {
+		fprintf( stderr, "stringlist_add_string: error encountered when copying aux data to new element\n" );
+		return(err);
+		}
+
+	return( 0 );
+}
+
+/*******************************************************************************
+ * Concatenate one stringlist onto the end of another stringlist. I.e., if
+ * dest is a stringlist, and src is a stringlist, this returns (dest, src)
+ * This COPIES data to a new entry on the dest list, so if you are done with 
+ * the src list, it is OK to delete it (and should be deleted).
+ *
+ * Returns 0 on success, -1 on error (usually inability to allocate memory)
+ */
+	int
+stringlist_cat( Stringlist **dest, Stringlist **src )
+{
+	Stringlist *sl;
+	int	err;
+
+	if( dest == NULL ) {
+		fprintf( stderr, "stringlist_cat: Error, null reference to a destination stringlist passed!\n" );
+		return( -6 );
+		}
+	if( src == NULL ) {
+		fprintf( stderr, "stringlist_cat: Error, null reference to a source stringlist passed!\n" );
+		return( -7 );
+		}
+
+	if( (*dest != NULL) &&  ((*dest)->magic != SL_MAGIC) ) {
+		if( (*dest)->magic == SL_BAD_MAGIC ) {
+			fprintf( stderr, "stringlist: Error in stringlist_cat: trying to use a previously deleted stringlist element (bad magic number)\n" );
+			return( -16 );
+			}
+		fprintf( stderr, "stringlist_cat: Error, passed destination stringlist is corrupted or malformed (has wrong magic number)\n" );
+		return( -47 );
+		}
+
+	if( *src == NULL ) 
+		return(0);	/* Nothing to do */
+	if( (*src)->magic != SL_MAGIC ) {
+		if( (*src)->magic == SL_BAD_MAGIC ) {
+			fprintf( stderr, "stringlist: Error in stringlist_cat: trying to use a previously deleted stringlist element (bad magic number)\n" );
+			return( -17 );
+			}
+		fprintf( stderr, "stringlist_cat: Error, passed source stringlist is corrupted or malformed (has wrong magic number)\n" );
+		return( -8 );
+		}
+
+	sl = *src;
+	while( sl != NULL ) {
+		if( (err = stringlist_add_string( dest, sl->string, sl->aux, sl->sltype )) < 0 ) 
+			return( err );
+		sl = sl->next;
+		}
+
+	return(0);
+}
+
+/*******************************************************************************
+ * Allocate space for a new Stringlist element 
+ * was: new_stringlist
+ * Returns 0 on success, -1 on error
+ */
+	static int
+stringlist_new_sl( Stringlist **el )
+{
+	(*el)         = (Stringlist *)malloc( sizeof( Stringlist ));
+	if( *el == NULL ) {
+		fprintf( stderr, "stringlist_new_sl: error, failed to allocate memory for a new stringlist element\n" );
+		return( -1 );
+		}
+
+	(*el)->magic  = SL_MAGIC;
+	(*el)->string = NULL;
+	(*el)->next   = NULL;
+	(*el)->prev   = NULL;
+	(*el)->index  = -1;
+	(*el)->aux    = NULL;
+	(*el)->sltype = SLTYPE_NULL;
+
+	return(0);
+}
+
+/******************************************************************************
+ * What's in this stringlist, anyway?
+ * was: dump_stringlist
+ */
+	void
+stringlist_dump( Stringlist *s )
+{
+	if( s == NULL ) {
+		printf( "<--- null pointer --->\n" );
+		return;
+		}
+
+	while( s != NULL ) {
+
+		if( s->magic != SL_MAGIC ) {
+			if( s->magic == SL_BAD_MAGIC ) {
+				fprintf( stderr, "stringlist: Error in stringlist_dump: trying to use a previously deleted stringlist (bad magic number)\n" );
+				return;
+				}
+			fprintf( stderr, "stringlist_dump: Error, passed stringlist is corrupted or malformed (has wrong magic number)\n" );
+			return;
+
+			}
+
+		printf( "MAGIC=%d ", s->magic );
+		printf( "ADDR=%ld ", (long)s );
+		printf( "PREV=%ld NEXT=%ld ", (long)s->prev, (long)s->next );
+		printf( "INDEX=%d: ", s->index );
+		if( s->string == NULL ) 
+			printf( "(null string) " );
+		else
+			printf( "\"%s\" ", s->string );
+		switch (s->sltype) {
+			case SLTYPE_NULL:
+				printf( "NULL --\n" );
+				break;
+			case SLTYPE_INT:
+				printf( "INT %d\n", *((int *)(s->aux)) );
+				break;
+			case SLTYPE_STRING:
+				printf( "STRING \"%s\"\n", ((char *)(s->aux)) );
+				break;
+			case SLTYPE_FLOAT:
+				printf( "FLOAT %f\n", *((float *)(s->aux)) );
+				break;
+			case SLTYPE_BOOL:
+				if( *((int *)(s->aux)) == 1 )
+					printf( "BOOL TRUE\n" );
+				else
+					printf( "BOOL FALSE\n" );
+				break;
+			default:
+				printf ("ERROR, unknown type in dump_stringlist: %d\n", s->sltype );
+			}
+		s = s->next;
+		}
+}
+
+/******************************************************************************
+ * Returns the number of entries in the Stringlist
+ * was: n_strings_in_list
+ */
+	int
+stringlist_len( Stringlist *s )
+{
+	Stringlist *c;
+	int	   i;
+
+	if( (s != NULL) && (s->magic != SL_MAGIC) ) {
+		if( s->magic == SL_BAD_MAGIC ) {
+			fprintf( stderr, "stringlist: Error in stringlist_len: trying to use a previously deleted stringlist element (bad magic number)\n" );
+			return( -18 );
+			}
+		fprintf( stderr, "stringlist_len: Error, passed stringlist is corrupted or malformed (has wrong magic number)\n" );
+		return( -8 );
+		}
+
+	i = 0;
+	c = s;
+	while( c != NULL ) {
+		i++;
+		c = c->next;
+		}
+
+	return( i );
+}
+
+/*******************************************************************************************
+ * Checks args for correctness. Returns 0 on success (no error), -1 if there is a problem.
+ */
+	static int
+stringlist_check_args( Stringlist **list, char *new_string, void *aux, int sltype )
+{
+	/* Can't be passed a null REFERENCE to the stringlist, what does that mean?? */
+	if( list == NULL ) {
+		fprintf( stderr, "stringlist: error, passed a null reference to a stringlist\n" );
+		return( -5 );
+		}
+
+	/* It's OK if the passed list itself is NULL. That just means we haven't put anything
+	 * on this list yet. However, if it's NOT null, then it must point to a valid
+	 * stringlist element.
+	 */
+	if( (*list != NULL) && ((*list)->magic != SL_MAGIC) ) {
+		if( (*list)->magic == SL_BAD_MAGIC ) {
+			fprintf( stderr, "stringlist: Error in stringlist_check_args: trying to use a previously deleted stringlist element (bad magic number)\n" );
+			return( -15 );
+			}
+		fprintf( stderr, "stringlist: Error, passed stringlist is corrupted or malformed (has wrong magic number)\n" );
+		return( -3 );
+		}
+
+	if( new_string == NULL ) {
+		fprintf( stderr, "stringlist: NULL pointer to character string passed\n" );
+		return(-1);
+		}
+
+	/* Check input args */
+	if( strlen(new_string) > STRINGLIST_MAX_LEN ) {
+		fprintf( stderr, "stringlist: error, trying to add string that is too long to a stringlist.\n" );
+		fprintf( stderr, "String trying to add:\n" );
+		fprintf( stderr, "\"%s\"\n", new_string );
+		return(-1);
+		}
+
+	if( (sltype != SLTYPE_NULL)   && 
+	    (sltype != SLTYPE_INT)    &&
+	    (sltype != SLTYPE_STRING) &&
+	    (sltype != SLTYPE_FLOAT)  &&
+	    (sltype != SLTYPE_BOOL)) {
+	    	fprintf( stderr, "stringlist: error, an invalid aux data type was given: %d\n", sltype );
+		return(-1);
+		}
+
+	if( (sltype == SLTYPE_STRING) && (strlen( (char *)aux ) > STRINGLIST_MAX_LEN) ) {
+		fprintf( stderr, "stringlist_check_args: error, trying to add auxilliary string data to a stringlist element and that string is longer than allowed max of %d\n",
+			STRINGLIST_MAX_LEN );
+		return( -68 );
+		}
+
+	return(0);
+}
+
+/**************************************************************************************
+ * Returns 0 on success, -1 on error (usually inability to allocate memory)
+ */
+	static int
+stringlist_copy_name( Stringlist *new_el, char *new_string ) 
+{
+	if( new_el == NULL ) {
+		fprintf( stderr, "stringlist: error, trying to copy a string to a NULL stringlist element!\n" );
+		return( -1 );
+		}
+	if( new_el->magic != SL_MAGIC ) {
+		if( new_el->magic == SL_BAD_MAGIC ) {
+			fprintf( stderr, "stringlist: Error in stringlist_copy_name: trying to use a previously deleted stringlist element (bad magic number)\n" );
+			return( -19 );
+			}
+		fprintf( stderr, "stringlist_copy_name: Error, passed stringlist element is corrupted or malformed (has wrong magic number)\n" );
+		return( -9 );
+		}
+
+	if( new_string == NULL ) {
+		fprintf( stderr, "stringlist: error, trying to copy a NULL to a stringlist name!\n" );
+		return( -1 );
+		}
+
+	if( strlen(new_string) > STRINGLIST_MAX_LEN ) {
+		fprintf( stderr, "stringlist: error, specified a string that is illegally long: %s\n", new_string );
+		return( -72 );
+		}
+
+	new_el->string = (char *)malloc( strlen( new_string )+1);
+	if( new_el == NULL ) {
+		fprintf( stderr, "stringlist_copy_name: malloc failed\n" );
+		fprintf( stderr, "string trying to add: %s\n", new_string );
+		return( -1 );
+		}
+	strcpy( new_el->string, new_string );
+
+	return(0);
+}
+
+/**************************************************************************************
+ * Returns 0 on success, -1 on error 
+ * Note this allocates all space needed for the stringlist, it must not be pre-allocated
+ *
+ * Structure of input file:
+ *
+ * integer (index #)          "string"         aux_type    aux_value
+ * 
+ * where aux_value will be in "quotes" if aux_type == STRING
+ */
+ 	int
+ stringlist_read_from_file( Stringlist **sl, FILE *fin ) 
+ {
+ 	char		line[4001];
+	int		err, version_number, lineno, debug;
+	Stringlist 	*header_el = NULL;
+
+	/* Check for obvious errors */
+	if( sl == NULL ) {
+		fprintf( stderr, "stringlist_read_from_file: error, passed a NULL pointer\n" );
+		exit(-1);
+		}
+	if( *sl != NULL ) {
+		fprintf( stderr, "stringlist_read_from_file: error, bad coding, should be passed a pointer to a NULL list\n" );
+		exit(-1);
+		}
+
+	debug = 0;
+
+	if( debug ) printf( "stringlist_read_from_file: entering\n" );
+
+	/* Advance to our header: it should read something like this:
+	 * -1 "STRINGLIST_SAVE_FILE_VERSION" INT 1
+	 */
+	lineno = 0;
+	version_number = -1;
+	while( fgets( line, 4000, fin ) != NULL ) {
+
+		if( debug ) printf( "stringlist_read_from_file: line %d: >%s<\n", lineno+1, line );
+
+		if( strncmp( line, "-1 \"STRINGLIST_SAVE_FILE_VERSION\" INT", 36 ) == 0 ) {
+
+			/* found the header */
+			if( debug ) printf( "stringlist_read_from_file: found header line\n" );
+
+			/* chomp trailing LF */
+			line[ strlen(line)-1 ] = '\0';
+
+			if( (err = stringlist_line_to_sl( line, lineno, &header_el )) != 0 ) {
+				fprintf( stderr, "stringlist_read_from_file: error reading header line from file!\n" );
+				return( err );
+				}
+
+			if( header_el->sltype != SLTYPE_INT ) {
+				fprintf( stderr, "stringlist_read_from_file: error reading save file version number from file\n" );
+				return( -53 );
+				}
+
+			version_number = *((int *)(header_el->aux));
+			if( debug ) printf( "stringlist_read_from_file: save file version number %d\n", version_number );
+			if( version_number == 1 ) 
+				return( stringlist_read_from_file_v1( sl, fin, lineno, debug ));
+			else
+				{
+				fprintf( stderr, "This version of the code cannot read save file version number %d\n", version_number );
+				return( -53 );
+				}
+			}
+		}
+
+	return(0);
+ }
+
+/**************************************************************************************
+ * Reads a version 1 stringlist save file
+ */
+ 	static int
+ stringlist_read_from_file_v1( Stringlist **sl, FILE *fin, int nlines_in_header, int debug ) 
+ {
+	char		line[4001];
+	int		err, lineno;
+	Stringlist 	*new_el;
+
+	if( debug ) printf( "stringlist_read_from_file_v1: entering\n" );
+
+	lineno = 0;
+	while( fgets( line, 4000, fin ) != NULL ) {
+
+		if( debug ) printf( "stringlist_read_from_file_v1: line %d: >%s<\n", lineno+nlines_in_header, line );
+
+		if( (strlen(line)>2) && (line[0] != '\0') && (line[0] != '#' )) {
+
+			/* chomp trailing LF */
+			line[ strlen(line)-1 ] = '\0';
+
+			new_el = NULL; 	/* This flags that we want to make a brand new element, and alloc space for it */
+
+			if( (err = stringlist_line_to_sl( line, lineno+nlines_in_header, &new_el )) != 0 ) 
+				return( err );
+
+			/* Now add this new information to our stringlist */
+			stringlist_cat( sl, &new_el );
+			
+			/* Free storage associated with temp element */
+			if( (err = stringlist_delete_single_element_inner( new_el )) != 0 ) {
+				fprintf( stderr, "stringlist_read_from_file_v1: error trying to free tmp storage\n" );
+				return( err );
+				}
+			}
+		lineno++;
+		}
+
+	return(0);
+}
+
+/**************************************************************************************
+ * Given a line of chars in savelist save file format, this creates a single stringlist
+ * element holding that info
+ * Returns 0 on success, < 0 on error
+ */
+	static int
+stringlist_line_to_sl( char *line, int lineno, Stringlist **retval )
+{
+	int	ival, debug, err, index0, index1, string0, string1, aux_type0, aux_type1, aux_val0, aux_val1,
+		nfields;
+	char	t_index[4000], t_string[4000], t_aux_type[4000], t_aux_val[4000], 
+		*t_string_ue, *t_aux_val_ue;
+	float	fval;
+
+	debug = 0;
+
+	/* Get indices (into the string char array) of the 
+	 * first and last positions of each of the four
+	 * elements (index_num, string, aux_type, and aux_value)
+	 */
+	err = stringlist_get_tok_indices( line, &index0, &index1, 
+			&string0,   &string1, 
+			&aux_type0, &aux_type1, 
+			&aux_val0,  &aux_val1 );
+	if( err != 0 ) {
+		fprintf( stderr, "stringlist_read_from_file: error, could not parse information on input file line %d\n", lineno+1 );
+		fprintf( stderr, "here was the problematical line:\n" );
+		fprintf( stderr, ">%s<\n", line );
+		return( err );
+		}
+	strncpy( t_index,    line+index0,    index1-index0+1 );
+	t_index[index1-index0+1] = '\0';
+
+	strncpy( t_string,   line+string0,   string1-string0+1 );
+	t_string[string1-string0+1] = '\0';
+	if( strlen(t_string) > STRINGLIST_MAX_LEN ) {
+		fprintf( stderr, "stringlist_line_to_sl: error, encountered a string that is too long. Max allowed: %d. Found: %ld. Line number: %d\n",
+			STRINGLIST_MAX_LEN, strlen(t_string), lineno );
+		return( -63 );
+		}
+	t_string_ue = stringlist_unescape_string( t_string );
+
+	strncpy( t_aux_type, line+aux_type0, aux_type1-aux_type0+1 );
+	t_aux_type[aux_type1-aux_type0+1] = '\0';
+
+	strncpy( t_aux_val,  line+aux_val0,  aux_val1-aux_val0+1 );
+	t_aux_val[aux_val1-aux_val0+1] = '\0';
+
+	if( debug ) {
+		printf( "line: >%s<\n", line );
+		printf( "index:>%s< string:>%s< aux_type:>%s< aux_val:>%s<\n",
+			t_index, t_string_ue, t_aux_type, t_aux_val );
+		}
+
+	/* Now put this information into a new stringlist element */
+	if( strcmp( t_aux_type, "NULL" ) == 0 ) {
+		if( (err = stringlist_add_string( retval, t_string_ue, NULL, SLTYPE_NULL )) != 0 ) {
+			fprintf( stderr, "stringlist_read_from_file: error encountered while processing line %d\n", lineno+1 );
+			return( err );
+			}
+		}
+
+	else if( strcmp( t_aux_type, "BOOL" ) == 0 ) {
+		if( strcmp( t_aux_val, "TRUE" ) == 0 ) {
+			ival = 1;
+			if( (err = stringlist_add_string( retval, t_string_ue, &ival, SLTYPE_BOOL )) != 0 ) {
+				fprintf( stderr, "stringlist_read_from_file: error encountered while processing line %d\n", lineno+1 );
+				return( err );
+				}
+			}
+
+		else if( strcmp( t_aux_val, "FALSE" ) == 0 ) {
+			ival = 0;
+			if( (err = stringlist_add_string( retval, t_string_ue, &ival, SLTYPE_BOOL )) != 0 ) {
+				fprintf( stderr, "stringlist_read_from_file: error encountered while processing line %d\n", lineno+1 );
+				return( err );
+				}
+			}
+		else
+			{
+			fprintf( stderr, "Error, got a boolean type that is neither TRUE nor FALSE, it is: %s\n",
+				t_aux_val );
+			fprintf( stderr, "stringlist_read_from_file: error encountered while processing line %d\n", lineno+1 );
+			return( -38 );
+			}
+		}
+
+	else if( strcmp( t_aux_type, "INT" ) == 0 ) {
+		nfields = sscanf( t_aux_val, "%d", &ival );
+		if( nfields != 1 ) {
+			fprintf( stderr, "stringlist_read_from_file: error, while reading line %d could not get a single integer from token >%s<\n", 
+				lineno+1, t_aux_val );
+			return( -30 );
+			}
+		if( (err = stringlist_add_string( retval, t_string_ue, &ival, SLTYPE_INT )) != 0 ) {
+			fprintf( stderr, "stringlist_read_from_file: error encountered while processing line %d\n", lineno+1 );
+			return( err );
+			}
+		}
+
+	else if( strcmp( t_aux_type, "FLOAT" ) == 0 ) {
+		nfields = sscanf( t_aux_val, "%f", &fval );
+		if( nfields != 1 ) {
+			fprintf( stderr, "stringlist_read_from_file: error, while reading line %d could not get a single float from token >%s<\n", 
+				lineno+1, t_aux_val );
+			return( -31 );
+			}
+		if( (err = stringlist_add_string( retval, t_string_ue, &fval, SLTYPE_FLOAT )) != 0 ) {
+			fprintf( stderr, "stringlist_read_from_file: error encountered while processing line %d\n", lineno+1 );
+			return( err );
+			}
+		}
+
+	else if( strcmp( t_aux_type, "STRING" ) == 0 ) {
+		t_aux_val_ue = stringlist_unescape_string( t_aux_val );
+		if( strlen(t_aux_val_ue) > STRINGLIST_MAX_LEN ) {
+			fprintf( stderr, "stringlist_line_to_sl: error, encountered a string that is too long. Max allowed: %d. Found: %ld. Line number: %d\n",
+				STRINGLIST_MAX_LEN, strlen(t_aux_val_ue), lineno );
+			return( -67 );
+			}
+		if( (err = stringlist_add_string( retval, t_string_ue, t_aux_val_ue, SLTYPE_STRING )) != 0 ) {
+			fprintf( stderr, "stringlist_read_from_file: error encountered while processing line %d\n", lineno+1 );
+			return( err );
+			}
+		free( t_aux_val_ue );
+		}
+
+	else
+		{
+		fprintf( stderr, "stringlist_read_from_file: encountered unhandled type: %s\n", 
+			t_aux_type );
+		return( -37 );
+		}
+
+	free( t_string_ue );	/* this is the un-escaped version of what we read in */
+
+	return(0);
+}
+
+/**************************************************************************************
+ */
+	static int 
+stringlist_get_tok_indices( char *line, int *index0, int *index1, int *string0, int *string1, 
+		int *aux_type0, int *aux_type1, int *aux_val0, int *aux_val1 )
+{
+	int	cursor, slen, aux_val_is_string;
+
+	if( line == NULL )
+		return( -1 );
+
+	cursor = 0;
+	slen   = strlen( line );
+
+	/* ========= GET INDEX ======= */
+	/* Advance past initial whitespace */
+	while( (cursor < slen) && my_isblank( line[cursor] ))
+		cursor++;
+	/* cursor is now NOT white space */
+	if( cursor == slen ) {
+		fprintf( stderr, "stringlist_get_tok_indices: error reading from file, is input line all blank?\n" );
+		return(-1);	/* line is all blank? */
+		}
+	*index0 = cursor;
+
+	/* Advance to next white space */
+	while( (cursor < slen) && (! my_isblank(line[cursor]))) 
+		cursor++;
+	/* cursor is now white space */
+	if( cursor == slen ) {
+		fprintf( stderr, "stringlist_get_tok_indices: error reading from file, does line end immeidiately after the index number?\n" );
+		return(-1);
+		}
+	*index1 = cursor-1;
+
+	/* ========= GET STRING ======= */
+	/* Advance past initial whitespace */
+	while( (cursor < slen) && my_isblank( line[cursor] ))
+		cursor++;
+	if( cursor == slen ) {
+		fprintf( stderr, "stringlist_get_tok_indices: error reading from file, does line have ONLY the index number, no string?\n" );
+		return(-1);	
+		}
+	/* cursor is now NOT white space, needs to be a quote sign (") */
+	if( line[cursor] != '"' ) {
+		fprintf( stderr, "stringlist_get_tok_indices: error reading from file, does string NOT start with a quote sign?\n" );
+		return(-1);
+		}
+	cursor++;	/* advance past quote sign */
+	*string0 = cursor;
+
+	/* Advance to next quote that is NOT escaped by a backslash */
+	/* an quote that is NOT escaped is this: ((line[cursor] == '"') && (line[cursor-1] != '\')) */
+	/* "while line[cursor] is NOT a (quote that is NOT escaped by a backslash)" */
+	while( (cursor < slen) && (! ((line[cursor] == '"') && (line[cursor-1] != '\\'))) )
+		cursor++;
+	if( cursor == slen ) {
+		fprintf( stderr, "stringlist_get_tok_indices: error reading from file, does string not end with a quote sign?\n" );
+		return(-1);	
+		}
+	/* cursor is now on an NOT escaped quote */
+	*string1 = cursor - 1;
+	cursor++;	/* advance past the NON escaped quote, should be whitespace */
+
+	/* ========= GET AUX TYPE ======= */
+	/* Advance past initial whitespace */
+	while( (cursor < slen) && my_isblank( line[cursor] ))
+		cursor++;
+	/* cursor is now NOT white space */
+	if( cursor == slen ) {
+		fprintf( stderr, "stringlist_get_tok_indices: error reading from file, does line end before specifying an aux_type?\n" );
+		return(-1);
+		}
+	*aux_type0 = cursor;
+
+	/* Advance to next white space */
+	while( (cursor < slen) && (! my_isblank(line[cursor]))) 
+		cursor++;
+	/* cursor is now white space */
+	if( cursor == slen ) {
+		fprintf( stderr, "stringlist_get_tok_indices: error reading from file, does line end immediately after the aux_type?\n" );
+		return(-1);
+		}
+	*aux_type1 = cursor-1;
+
+	/* ========== GET AUX VAL ========
+	 * If it starts with a quote, we assume it's a string 
+	 * and go to the matching unescaped quote.
+	 * Otherwise, just go to first whitespace or we
+	 * run out of string.
+	 */
+	/* Advance past initial whitespace */
+	while( (cursor < slen) && my_isblank( line[cursor] ))
+		cursor++;
+	if( cursor == slen ) {
+		fprintf( stderr, "stringlist_get_tok_indices: error reading from file, does line end before an aux_val is specified?\n" );
+		return(-1);
+		}
+	/* cursor is now NOT white space */
+	aux_val_is_string = (line[cursor] == '"');
+
+	if( aux_val_is_string ) {
+		cursor++;	/* Advance past the opening quote */
+		*aux_val0 = cursor;
+		/* Advance to next quote that is NOT escaped by a backslash; see above */
+		while( (cursor < slen) && (! ((line[cursor] == '"') && (line[cursor-1] != '\\'))) )
+			cursor++;
+		if( cursor == slen ) {
+			fprintf( stderr, "stringlist_get_tok_indices: error reading from file, does the string-valued aux_val NOT end with a quote?\n" );
+			return(-1);	
+			}
+		/* cursor is now on an NOT escaped quote */
+		*aux_val1 = cursor - 1;
+		}
+	else
+		{
+		*aux_val0 = cursor;
+		while( (cursor < slen) && (! my_isblank(line[cursor]))) 
+			cursor++;
+		/* cursor is now white space */
+		*aux_val1 = cursor-1;
+		}
+
+	return(0);
+}
+
+/**************************************************************************************
+ * Returns 0 on success, -1 on error (usually inability to allocate memory)
+ */
+ 	int
+ stringlist_write_to_file( Stringlist *sl, FILE *fout ) 
+ {
+	Stringlist *cursor, *header;
+	int	err, itmp;
+
+	/* Note that if we are passed a NULL, we do not even write a header */
+ 	if( sl == NULL )
+		return(0);
+
+	/* Stringlists are supposed to be small amounts of data. I add this check
+	 * as a security issue ... I do not want stringlists to be able to be
+	 * tricked into filling up a disk or something like that.
+	 */
+	if( stringlist_len( sl ) > STRINGLIST_MAX_NSTRINGS_WRITE ) {
+		fprintf( stderr, "stringlist_write_to_file: error, can only write a maximum of %d strings, but passed list had %d\n",
+			STRINGLIST_MAX_NSTRINGS_WRITE, stringlist_len( sl ) );
+		return( -61 );
+		}
+
+	/* We add, as a header, the version of this save file */
+	if( (stringlist_new_sl( &header )) != 0 ) {
+		fprintf( stderr, "stringlist_write_to_file: error trying to create header for file\n" );
+		return( -40 );
+		}
+	/* Copy name over to new element */
+	if( (err = stringlist_copy_name( header, "STRINGLIST_SAVE_FILE_VERSION" )) != 0 ) {
+		fprintf( stderr, "stringlist_write_to_file: error encountered when copying save file version tag to header\n" );
+		return(err);
+		}
+	/* Copy aux data to new element */
+	itmp = STRINGLIST_SAVEFILE_VERSION;
+	if( (err = stringlist_copy_aux( header, &itmp, SLTYPE_INT )) != 0 ) {
+		fprintf( stderr, "stringlist_add_string: error encountered when copying save file version number to header\n" );
+		return(err);
+		}
+
+	/* Write header to file */
+	if( (err = stringlist_write_single_element_to_file( header, fout )) != 0 ) 
+		return( err );
+
+	/* Delete header. Cheat here by using the quicker locally-known call to delete 
+	 * just a single element
+	 */
+	if( (err = stringlist_delete_single_element_inner( header )) != 0 )
+		return( err );
+
+	/* Write stringlist contents to file */
+	cursor = sl;
+	while( cursor != NULL ) {
+		if( strlen( cursor->string ) > STRINGLIST_MAX_LEN ) {
+			fprintf( stderr, "Error, trying to write an illegally long string to the file. Offending string: %s\n",
+				cursor->string );
+			return( -69 );
+			}
+		if( (cursor->sltype == SLTYPE_STRING) && (strlen( (char *)(cursor->aux) ) > STRINGLIST_MAX_LEN) ) {
+			fprintf( stderr, "Error, trying to write an illegally long aux information string to the file. Offending aux info string: %s\n",
+				(char *)(cursor->aux) );
+			return( -70 );
+			}
+		if( (err = stringlist_write_single_element_to_file( cursor, fout )) != 0 ) 
+			return( err );
+		cursor = cursor->next;
+		}
+
+	return( 0 );
+}
+
+/**************************************************************************************
+ * Returns 0 on success, -1 on error 
+ */
+ 	static int
+ stringlist_write_single_element_to_file( Stringlist *sl, FILE *fout ) 
+ {
+	char	*string_esc;	/* Escaped version of the string */
+
+ 	if( sl == NULL )
+		return(0);
+
+	if( sl->magic != SL_MAGIC ) {
+		if( sl->magic == SL_BAD_MAGIC ) {
+			fprintf( stderr, "stringlist: Error in stringlist_write_to_file: trying to use a previously deleted stringlist element (bad magic number)\n" );
+			return( -15 );
+			}
+		fprintf( stderr, "stringlist_write_to_file: Error, passed stringlist is corrupted or malformed (has wrong magic number)\n" );
+		return( -10 );
+		}
+	string_esc = stringlist_escape_string( sl->string );
+	fprintf( fout, "%d \"%s\"", sl->index, string_esc );
+	free( string_esc );
+
+	switch( sl->sltype ) {
+		case SLTYPE_NULL:
+			fprintf( fout, " NULL NULL\n" );
+			break;
+
+		case SLTYPE_INT:
+			fprintf( fout, " INT %d\n", *((int *)(sl->aux)) );
+			break;
+
+		case SLTYPE_FLOAT:
+			fprintf( fout, " FLOAT %f\n", *((float *)(sl->aux)) );
+			break;
+
+		case SLTYPE_BOOL:
+			if( *((int *)(sl->aux)) == 1 )
+				fprintf( fout, " BOOL TRUE\n" );
+			else
+				fprintf( fout, " BOOL FALSE\n" );
+			break;
+
+		case SLTYPE_STRING:
+			string_esc = stringlist_escape_string( (char *)(sl->aux) );
+			fprintf( fout, " STRING \"%s\"\n", string_esc );
+			free( string_esc );
+			break;
+
+		default:
+			fprintf( stderr, "stringlist_write_to_file: error, encountered unknown aux data type %d\n", sl->sltype );
+			return( -30 );
+		}
+
+	return(0);
+}
+
+/**************************************************************************************
+ * Deletes a single element, but does NOT try to mess with pointers to take
+ * it out of the list. Just a simplistic delete of storage associated with this
+ * element.
+ */
+	static int
+stringlist_delete_single_element_inner( Stringlist *sl ) 
+{
+	if( sl == NULL ) {
+		fprintf( stderr, "stringlist_delete_single_element_inner: error, passed a NULL element\n" );
+		return( -11 );
+		}
+
+	if( sl->magic != SL_MAGIC ) {
+		if( sl->magic == SL_BAD_MAGIC ) {
+			fprintf( stderr, "stringlist: Error in stringlist_delete_single_element: trying to delete a previously deleted stringlist element (bad magic number)\n" );
+			return( -15 );
+			}
+		fprintf( stderr, "stringlist_delete_single_element_inner: error, corrupted or malformed stringlist element encountered\n" );
+		return( -12 );
+		}
+
+	/* Mark this element as deleted */
+	sl->magic = SL_BAD_MAGIC;
+
+	if( sl->string != NULL ) 
+		free( sl->string );
+
+	if( sl->sltype == SLTYPE_STRING ) {
+		if( sl->aux != NULL ) 
+			free( sl->aux );
+		}
+
+	free( sl );
+
+	return( 0 );
+}
+
+/**************************************************************************************
+ * Deletes this element, and all elements both before and after it on the list
+ * Returns 0 on success, -1 on error 
+ */
+	int
+stringlist_delete_entire_list( Stringlist *sl ) 
+{
+	int		err;
+	Stringlist	*sl_prev, *sl_next, *tt;
+
+	if( sl == NULL )
+		return( 0 );	/* that was easy */
+
+	/* Delete all prev elements */
+	sl_prev = sl->prev;
+	while( sl_prev != NULL ) {
+		tt = sl_prev->prev;
+		if( (err=stringlist_delete_single_element_inner( sl_prev )) != 0) {
+			fprintf( stderr, "stringlist_delete_entire_list: error encountered\n" );
+			return( err );
+			}
+		sl_prev = tt;
+		}
+
+	/* Delete all next elements */
+	sl_next = sl->next;
+	while( sl_next != NULL ) {
+		tt = sl_next->next;
+		if( (err = stringlist_delete_single_element_inner( sl_next )) != 0 ) {
+			fprintf( stderr, "stringlist_delete_entire_list: error encountered\n" );
+			return( err );
+			}
+		sl_next = tt;
+		}
+
+	stringlist_delete_single_element_inner( sl );
+
+	return( 0 );
+}
+
+/**************************************************************************************
+ * Creates an "UNescaped" version of a string, that is, one with backslashes before
+ * all quote or backslashes removed.
+ *
+ * NOTE that this allocates space for the return string, so calling code must
+ * do a free( retval ) after using the return value!
+ */
+	static char *
+stringlist_unescape_string( char *ss ) 
+{
+	char	*retval;
+	int	ii, iout;
+
+	if( ss == NULL ) return( NULL );
+	if( strlen(ss) == 0 ) {
+		retval = (char *)malloc( sizeof(char) );
+		*retval = '\0';
+		return( retval );
+		}
+
+	/* Unescaped version can never be longer than original size */
+	retval = (char *)malloc( sizeof(char)*strlen(ss) + 1 );
+	if( retval == NULL ) {
+		fprintf( stderr, "Error in stringlist routine stringlist_unescape_string: could not allocate new string of length %ld\n", (strlen(ss)+1) );
+		exit(-1);
+		}
+
+	iout = 0;
+	for( ii=0; ii<strlen(ss); ii++ ) {
+		if( ss[ii] == '\\' ) 
+			ii++;
+		retval[iout++] = ss[ii];
+		}
+
+	retval[iout] = '\0';
+	return( retval );
+}
+
+/**************************************************************************************
+ * Creates an "escaped" version of a string, that is, one with backslashes before
+ * all quote or backslashes.
+ *
+ * NOTE that this allocates space for the return string, so calling code must
+ * do a free( retval ) after using the return value!
+ */
+ 	static char *
+stringlist_escape_string( char *ss ) 
+{
+	char 	*retval;
+	int	ii, iout;
+
+	if( ss == NULL ) return(NULL);
+	if( strlen(ss) == 0 ) {
+		retval = (char *)malloc( sizeof(char) );
+		*retval = '\0';
+		return( retval );
+		}
+
+	/* Max length the escaped version can be is twice orig size */
+	retval = (char *)malloc( sizeof(char) * 2 * (strlen(ss)+1) );
+	if( retval == NULL ) {
+		fprintf( stderr, "Error in stringlist routine stringlist_escape_string: could not allocate new string of length %ld\n", 2 * (strlen(ss)+1) );
+		exit(-1);
+		}
+
+	iout = 0;
+	for( ii=0; ii<strlen(ss); ii++ ) {
+		if( (ss[ii] == '"') || (ss[ii] == '\\')) {
+			retval[iout++] = '\\';
+			}
+		retval[iout++] = ss[ii];
+		}
+	retval[iout] = '\0';
+
+	return( retval );
+}
+
diff --git a/src/stringlist.h b/src/stringlist.h
new file mode 100644
index 0000000..0092f37
--- /dev/null
+++ b/src/stringlist.h
@@ -0,0 +1,73 @@
+
+#ifndef SEEN_STRINGLIST_H
+#define SEEN_STRINGLIST_H
+
+/*-------------------------------------------
+ * How long the string in a stringlist can be
+ *-------------------------------------------*/
+#define STRINGLIST_MAX_LEN	1000
+
+/*-------------------------------------------------------------------
+ * When writing to a file, we will never write more strings than this
+ *-------------------------------------------------------------------*/
+#define STRINGLIST_MAX_NSTRINGS_WRITE 	10000
+
+/*-----------------------------------------------
+ * Types that the aux data in a stringlist can be
+ *-----------------------------------------------*/
+#define SLTYPE_NULL	0	
+#define SLTYPE_INT	1
+#define SLTYPE_STRING	2
+#define SLTYPE_FLOAT	3
+#define SLTYPE_BOOL	4
+
+/* A signature to check for bad values or corruption 
+ * The 'bad' one is what we set deleted elements to,
+ * so maybe we can detect trying to use a deleted
+ * stringlist.
+ */
+#define SL_MAGIC	93823
+#define SL_BAD_MAGIC	13423
+
+/* Version number for the save file */
+#define STRINGLIST_SAVEFILE_VERSION	1
+
+/*****************************************************************************/
+/* A general purpose list of character strings */
+typedef struct {
+	int	magic;		/* Will be SL_MAGIC for valid elements */
+	char	*string;
+	void	*next, *prev;
+	int	index;		/* initialized to position in list */
+	void	*aux;		/* auxilliary data */
+	int	sltype;		/* one of the defined SLTYPEs, indicating type of aux */
+} Stringlist;
+
+
+/* Return 0 on success, -1 on error (usually inability to allocate memory */
+int 	stringlist_add_string( Stringlist **list, char *new_string, void *aux, int sltype );
+
+/* Return 0 on success, -1 on error (usually inability to allocate memory */
+int 	stringlist_add_string_ordered( Stringlist **list, char *new_string, void *aux, int sltype );
+
+/* Return 0 on success, -1 on error (usually inability to allocate memory */
+int 	stringlist_cat( Stringlist **dest, Stringlist **src );
+
+/* Return 0 on success, -1 on error (usually inability to allocate memory */
+int 	stringlist_write_to_file( Stringlist *sl, FILE *fout );
+
+/* Return 0 on success, -1 on error (usually inability to allocate memory */
+int 	stringlist_read_from_file( Stringlist **sl, FILE *fin );
+
+/* Return NULL if the string is not found, and pointer to matching element if it is found */
+Stringlist *stringlist_match_string_exact( Stringlist *list, char *str );
+
+/* Return 0 on success, -1 on error */
+int 	stringlist_delete_entire_list( Stringlist *sl );
+
+
+void 	stringlist_dump( Stringlist *s );
+int 	stringlist_len( Stringlist *s );
+
+#endif
+
diff --git a/src/tsh b/src/tsh
new file mode 100644
index 0000000..afa3d76
--- /dev/null
+++ b/src/tsh
@@ -0,0 +1 @@
+gcc  -g -O2  -L/home/pierce/src/packages/data/udunits/udunits-2.1.11/install/lib -ludunits2 -lexpat -L/home/pierce/src/packages/data/udunits/udunits-2.1.11/install/lib -ludunits2 -L/home/pierce/src/packages/data/netcdf/netcdf-4.1.2/install/lib -lnetcdf -L/home/pierce/lib -lhdf5_hl -lhdf5 -lz -lcurl -Wl,-Bsymbolic-functions -lgssapi_krb5 -lSM -lICE  -lX11   -Wl,-R,/home/pierce/src/packages/data/udunits/udunits-2.1.11/install/lib -Wl,-R,/home/pierce/src/packages/data/udunits/udunits-2.1.11 [...]
diff --git a/src/udu.c b/src/udu.c
index 4ec56a9..38950f5 100644
--- a/src/udu.c
+++ b/src/udu.c
@@ -44,7 +44,7 @@ static UniqList 	*uniq = NULL;
 /******************************************************************************/
 #ifdef HAVE_UDUNITS2
 
-static ut_system	*unitsys;
+ut_system	*unitsys;
 
 #include "udunits2.h"
 #include "utCalendar2_cal.h"
@@ -52,8 +52,6 @@ static ut_system	*unitsys;
 /******************************************************************************/
 void udu_utinit( char *path )
 {
-	int	err;
-
 	/* Turn annoying "override" errors off */
 	ut_set_error_message_handler( ut_ignore );
 
@@ -110,14 +108,14 @@ int udu_utistime( char *dimname, char *unitstr )
 /******************************************************************************/
 int udu_calc_tgran( int fileid, NCVar *v, int dimid )
 {
-	ut_unit	*unit, *seconds;
-	double	slope, intercept;
-	int	ii, retval;
-	int	verbose, has_bounds;
-	double	tval0, tval1, delta_sec, bound_min, bound_max;
-	char	cval0[1024], cval1[1024];
-	nc_type rettype;
-	size_t	cursor_place[MAX_NC_DIMS];
+	ut_unit		*unit, *seconds;
+	int		ii, retval;
+	int		verbose, has_bounds;
+	double		tval0_user, tval0_sec, tval1_user, tval1_sec, delta_sec, bound_min, bound_max;
+	char		cval0[1024], cval1[1024];
+	nc_type 	rettype;
+	size_t		cursor_place[MAX_NC_DIMS];
+	cv_converter	*convert_units_to_sec;
 
 	NCDim *d;
 	d = *(v->dim+dimid);
@@ -142,20 +140,33 @@ int udu_calc_tgran( int fileid, NCVar *v, int dimid )
 		exit( -1 );
 		}
 	
-	if( utConvert( &unit, &seconds, &slope, &intercept ) != 0 ) {
-		fprintf( stderr, "internal error: udu_calc_tgran can't convert time units to seconds!\n" );
-		exit( -1 );
+	/* Get converter to convert from "units" to "seconds" */
+	if( ut_are_convertible( unit, seconds ) == 0 ) {
+		/* Units are not convertible */
+		return( TGRAN_SEC );
+		}
+	if( (convert_units_to_sec = ut_get_converter( unit, seconds )) == NULL ) {
+		/* This shouldn't happen */
+		return( TGRAN_SEC );
 		}
 
 	/* Get a delta time to analyze */
 	for( ii=0L; ii<v->n_dims; ii++ )
 		cursor_place[ii] = (int)((*(v->size+ii))/2.0);
-	rettype = fi_dim_value( v, dimid, 1L, &tval0, cval0, &has_bounds, &bound_min, &bound_max, cursor_place );
-	rettype = fi_dim_value( v, dimid, 2L, &tval1, cval1, &has_bounds, &bound_min, &bound_max, cursor_place );
-	delta_sec = fabs(tval1 - tval0)*slope;
+	rettype = fi_dim_value( v, dimid, 1L, &tval0_user, cval0, &has_bounds, &bound_min, &bound_max, cursor_place );
+	rettype = fi_dim_value( v, dimid, 2L, &tval1_user, cval1, &has_bounds, &bound_min, &bound_max, cursor_place );
+
+	/* Convert time vals from user units to seconds */
+	tval0_sec = cv_convert_double( convert_units_to_sec, tval0_user );
+	tval1_sec = cv_convert_double( convert_units_to_sec, tval1_user );
+
+	/* Free our units converter storage */
+	cv_free( convert_units_to_sec );
+
+	delta_sec = fabs(tval1_sec - tval0_sec);
 	
 	if( verbose ) 
-		printf( "units: %s  t1: %lf t2: %lf delta-sec: %lf\n", d->units, tval0, tval1, delta_sec );
+		printf( "units: %s  t1: %lf t2: %lf delta-sec: %lf\n", d->units, tval0_user, tval1_user, delta_sec );
 
 	if( delta_sec < 57. ) {
 		if(verbose)
diff --git a/src/udu.o b/src/udu.o
deleted file mode 100644
index e56c80d..0000000
Binary files a/src/udu.o and /dev/null differ
diff --git a/src/utCalendar2_cal.c b/src/utCalendar2_cal.c
index 3f130e5..0c9db9a 100644
--- a/src/utCalendar2_cal.c
+++ b/src/utCalendar2_cal.c
@@ -21,6 +21,8 @@
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
+/* #define DEBUG */
+
 #include "../config.h"
 
 #ifdef HAVE_UDUNITS2
@@ -95,16 +97,27 @@ char *fuckyou;
 	static	double  s0, extra_seconds0;
 	static	char *prev_calendar=NULL;
 
+#ifdef DEBUG
+	fprintf( stderr, "utCalendar2_cal: entering with val=%lf calendar_name=%s\n", val, calendar_name );
+#endif
+
 	if( dataunits == NULL ) {
 		fprintf( stderr, "Error, utCalendar2 passed a NULL units\n" );
 		return( UT_ENOINIT );
 		}
 
-	if( have_initted == 0 ) 
+	if( have_initted == 0 ) {
+#ifdef DEBUG
+		fprintf( stderr, "utCalendar2_cal: initializing\n" );
+#endif
 		initialize( ut_get_system(dataunits) );
+		}
 
 	/* Get the calendar we will be using, based on the passed name
 	 */
+#ifdef DEBUG
+	fprintf( stderr, "utCalendar2_cal: getting calendar based on name\n" );
+#endif
 	cal2use = getcal( calendar_name );
 	if( cal2use == NULL ) {
 		unknown_cal_emit_warning( calendar_name );
@@ -117,12 +130,22 @@ char *fuckyou;
 	if( (prev_units != NULL) && (prev_calendar != NULL) 
 			&& (strcmp(prev_calendar,cal2use->name)==0) 
 			&& (ut_compare( prev_units, dataunits ) == 0)) {
+#ifdef DEBUG
+		fprintf( stderr, "utCalendar2_cal: using calendar and units from saved last call\n" );
+		fprintf( stderr, "utCalendar2_cal: saved origin day=%d/%d/%d %d:%d:%f\n", 
+			y0, mon0, d0, h0, min0, s0 );
+		fprintf( stderr, "utCalendar2_cal: saved extra_seconds0=%lf\n", extra_seconds0 );
+		fprintf( stderr, "utCalendar2_cal: in saved calendar, saved origin date %d/%d/%d is saved julian day %d\n", 
+			y0, mon0, d0, jday0 );
+#endif
 		/* Units and calendar are same as used last call */
 		}
 	else
 		{
 		/* Units/calendar combo are different from previously saved units, must redo calcs */
-
+#ifdef DEBUG
+		fprintf( stderr, "utCalendar2_cal: calendar and units are different from last call\n" );
+#endif
 		if( prev_units != NULL ) 
 			ut_free( prev_units );
 
@@ -130,18 +153,35 @@ char *fuckyou;
 			free( prev_calendar );
 
 		/* Get origin day of the data units */
+#ifdef DEBUG
+		fprintf( stderr, "utCalendar2_cal: getting origin day of data units\n" );
+#endif
 		get_origin( dataunits, &y0, &mon0, &d0, &h0, &min0, &s0 );	/* Note: static vars */
+#ifdef DEBUG
+		fprintf( stderr, "utCalendar2_cal: origin day=%d/%d/%d %d:%d:%f\n", 
+			y0, mon0, d0, h0, min0, s0 );
+#endif
 
 		/* Number of seconds into the specified origin day */
 		extra_seconds0 = h0*3600.0 + min0*60.0 + s0;			/* Note: static vars */
+#ifdef DEBUG
+		fprintf( stderr, "utCalendar2_cal: extra_seconds0=%lf\n", extra_seconds0 );
+#endif
 
 		/* Convert the origin day to Julian Day number in the specified calendar */
+#ifdef DEBUG
+		fprintf( stderr, "utCalendar2_cal: convering origin day to julian day num in specified calendar\n" );
+#endif
 		if( (ierr = ccs_date2jday( cal2use, y0, mon0, d0, &jday0 )) != 0 ) {
 fuckyou = (char *)ccs_err_str((int)ierr);
 			/* fprintf( stderr, "Error in utCalendar2: %s\n", ccs_err_str(ierr) ); */
 			fprintf( stderr, "Error in utCalendar2: %s\n", fuckyou );
 			return( UT_EINVALID );
 			}
+#ifdef DEBUG
+		fprintf( stderr, "utCalendar2_cal: in calendar, date %d/%d/%d is julian day %d\n", 
+			y0, mon0, d0, jday0 );
+#endif
 
 		/* Get converter from user-specified units to "days" */
 		if( conv_user_units_to_days != NULL ) 
@@ -151,6 +191,9 @@ fuckyou = (char *)ccs_err_str((int)ierr);
 		/* Save these units so we can reuse our time-consuming
 		 * calculations next time if they are the same units
 		 */
+#ifdef DEBUG
+		fprintf( stderr, "utCalendar2_cal: saving units for future use\n" );
+#endif
 		prev_units = ut_clone( dataunits );
 		if( ut_compare( prev_units, dataunits ) != 0 ) {
 			fprintf( stderr, "error, internal error in udunits2 library found in routine utCalendar2: a clone of the user's units does not equal the original units!\n" );
@@ -162,16 +205,28 @@ fuckyou = (char *)ccs_err_str((int)ierr);
 		}
 
 	/* Convert user value of offset to floating point days */
+#ifdef DEBUG
+	fprintf( stderr, "utCalendar2_cal: converting user val=%lf to floating point days\n", val );
+#endif
 	fdays = cv_convert_double( conv_user_units_to_days, val );
 
 	/* Get integer number of days and seconds past that */
 	ndays = fdays;	
 	extra_seconds = (fdays - ndays)*86400.0;
+#ifdef DEBUG
+	fprintf( stderr, "utCalendar2_cal: integer number of days & seconds past that; days=%d extra_seconds=%lf\n", ndays, extra_seconds );
+#endif
 
 	/* Get new Julian day */
 	jdnew = jday0 + ndays;
+#ifdef DEBUG
+	fprintf( stderr, "utCalendar2_cal: new julian day=%d\n", jdnew );
+#endif
 
 	/* Handle the sub-day part */
+#ifdef DEBUG
+	fprintf( stderr, "utCalendar2_cal: handling sub-day part\n" );
+#endif
 	tot_extra_seconds = extra_seconds0 + extra_seconds;
 	ndinc = tot_extra_seconds / 86400.0;
 	jdnew += ndinc;
@@ -182,6 +237,9 @@ fuckyou = (char *)ccs_err_str((int)ierr);
 		}
 
 	/* Convert to a date */
+#ifdef DEBUG
+	fprintf( stderr, "utCalendar2_cal: converting to a date\n" );
+#endif
 	if( (ierr = ccs_jday2date( cal2use, jdnew, year, month, day )) != 0 ) {
 		fprintf( stderr, "Error in utCalendar2: %s\n", ccs_err_str(ierr) );
 		return( UT_EINVALID );
@@ -194,10 +252,15 @@ fuckyou = (char *)ccs_err_str((int)ierr);
 	*second = tot_extra_seconds;
 
 	/* Handle the rouding issues */
+#ifdef DEBUG
+	fprintf( stderr, "utCalendar2_cal: handling rounding issues\n" );
+#endif
 	iorig  = *second;			/* Integer conversion */
 	iround = *second + sec_rounding_value;	
 	if( iround > iorig ) {
-		/* printf( "rounding alg invoked, orig date: %04d-%02d-%02d %02d:%02d:%.20lf\n", *year, *month, *day, *hour, *minute, *second ); */
+#ifdef DEBUG
+		printf( "rounding alg invoked, orig date: %04d-%02d-%02d %02d:%02d:%.20lf\n", *year, *month, *day, *hour, *minute, *second );
+#endif
 		*second = (double)iround;
 		if( *second >= 60.0 ) {
 			*second -= 60.0;
@@ -214,9 +277,14 @@ fuckyou = (char *)ccs_err_str((int)ierr);
 					}
 				}
 			}
-		/* printf( "after rounding alg here is new date: %04d-%02d-%02d %02d:%02d:%02.20lf\n", *year, *month, *day, *hour, *minute, *second ); */
+#ifdef DEBUG
+		printf( "after rounding alg here is new date: %04d-%02d-%02d %02d:%02d:%02.20lf\n", *year, *month, *day, *hour, *minute, *second );
+#endif
 		}
 
+#ifdef DEBUG
+	fprintf( stderr, "utCalendar2_cal: returning date %d/%d/%d %d:%d:%f\n", *year, *month, *day, *hour, *minute, *second  );
+#endif
 	return(0);
 }
 
@@ -237,11 +305,23 @@ int utInvCalendar2_cal( int year, int month, int day, int hour, int minute, doub
 	static	cv_converter *conv_days_to_user_units=NULL;
 	static char 	*prev_calendar=NULL;
 
-	if( have_initted == 0 ) 
+#ifdef DEBUG
+	fprintf( stderr, "utInvCalendar2_cal: entering with date=%d/%d/%d  calendar_name=%s\n", 
+			year, month, day, calendar_name );
+#endif
+
+	if( have_initted == 0 ) {
+#ifdef DEBUG
+		fprintf( stderr, "utInvCalendar2_cal: calling initialize\n" );
+#endif
 		initialize( ut_get_system(user_unit) );
+		}
 
 	/* Get the calendar we will be using, based on the passed name
 	 */
+#ifdef DEBUG
+	fprintf( stderr, "utInvCalendar2_cal: getting calendar to use\n" );
+#endif
 	cal2use = getcal( calendar_name );
 	if( cal2use == NULL ) {
 		unknown_cal_emit_warning( calendar_name );
@@ -252,9 +332,15 @@ int utInvCalendar2_cal( int year, int month, int day, int hour, int minute, doub
 			&& (strcmp(prev_calendar,cal2use->name)==0) 
 			&& (ut_compare( prev_units, user_unit ) == 0)) {
 		/* Units are same as used last call */
+#ifdef DEBUG
+		fprintf( stderr, "utInvCalendar2_cal: using previously stored units from last call\n" );
+#endif
 		}
 	else
 		{
+#ifdef DEBUG
+		fprintf( stderr, "utInvCalendar2_cal: new units, initting units structures\n" );
+#endif
 		if( prev_units != NULL )
 			ut_free( prev_units );
 
@@ -268,6 +354,9 @@ int utInvCalendar2_cal( int year, int month, int day, int hour, int minute, doub
 		get_origin( user_unit, &y0, &mon0, &d0, &h0, &min0, &s0 );	/* Note: static vars */
 
 		/* Convert the origin day to Julian Day number in the specified calendar */
+#ifdef DEBUG
+		fprintf( stderr, "utInvCalendar2_cal: convering origin day to Julian day in specified calendar\n" );
+#endif
 		if( (ierr = ccs_date2jday( cal2use, y0, mon0, d0, &jday0 )) != 0 ) {
 			fprintf( stderr, "Error in utCalendar2: %s\n", ccs_err_str(ierr) );
 			return( UT_EINVALID );
@@ -282,6 +371,9 @@ int utInvCalendar2_cal( int year, int month, int day, int hour, int minute, doub
 		/* Save these units so we can reuse our time-consuming
 		 * calculations next time if they are the same units
 		 */
+#ifdef DEBUG
+		fprintf( stderr, "utInvCalendar2_cal: saving units\n" );
+#endif
 		prev_units = ut_clone( user_unit );
 		if( ut_compare( prev_units, user_unit ) != 0 ) {
 			fprintf( stderr, "error, internal error in udunits2 library found in routine utInvCalendar2: a clone of the user's units does not equal the original units!\n" );
@@ -293,6 +385,9 @@ int utInvCalendar2_cal( int year, int month, int day, int hour, int minute, doub
 		}
 
 	/* Turn passed date into a Julian day */
+#ifdef DEBUG
+	fprintf( stderr, "utInvCalendar2_cal: turning passed date into a julian day\n" );
+#endif
 	if( (ierr = ccs_date2jday( cal2use, year, month, day, &jday )) != 0 ) {
 		fprintf( stderr, "Error in utInvCalendar2: %s\n", ccs_err_str(ierr) );
 		return( UT_EINVALID );
@@ -310,12 +405,18 @@ int utInvCalendar2_cal( int year, int month, int day, int hour, int minute, doub
 	fdiff_in_partdays = fpartday - fpartday0;
 
 	/* Convert days and partial days to user's units */
+#ifdef DEBUG
+	fprintf( stderr, "utInvCalendar2_cal: convering days and partial days to users units\n" );
+#endif
 	val_days     = cv_convert_double( conv_days_to_user_units, fdiff_in_days     );
 	val_partdays = cv_convert_double( conv_days_to_user_units, fdiff_in_partdays );
 
 	/* Hopefully this will minimize the roundoff errors */
 	*value = val_days + val_partdays;
 
+#ifdef DEBUG
+	fprintf( stderr, "utInvCalendar2_cal: returning\n" );
+#endif
 	return(0);
 }
 
diff --git a/src/utCalendar2_cal.o b/src/utCalendar2_cal.o
deleted file mode 100644
index 225da42..0000000
Binary files a/src/utCalendar2_cal.o and /dev/null differ
diff --git a/src/util.c b/src/util.c
index 0ec4cdb..708023d 100644
--- a/src/util.c
+++ b/src/util.c
@@ -30,15 +30,21 @@
  * 	file format.
  *******************************************************************************/
 
+/* This memory check makes things run slow */
+/* define CHECK_MEM */
+
 #include "ncview.includes.h"
 #include "ncview.defines.h"
 #include "ncview.protos.h"
 
 #include "math.h"
 
+/*-------------------*/
 #ifdef HAVE_UDUNITS2
-#include <udunits.h>
-#endif
+#include "udunits2.h"
+extern ut_system *unitsys;
+#endif 
+/*-------------------*/
 
 extern Options   options;
 extern NCVar     *variables;
@@ -53,6 +59,10 @@ static void contract_data( float *small_data, View *v, float fill_value );
 static int equivalent_FDBs( NCVar *v1, NCVar *v2 );
 static int data_has_mv( float *data, size_t n, float fill_value );
 static void handle_dim_mapping( NCVar *v );
+static void handle_dim_mapping_scalar( NCVar *v, char *coord_var_name, char *coord_att );
+static void handle_dim_mapping_2d( NCVar *v, char *coord_var_name, char *coord_att, 
+	size_t *coord_var_eff_size, int coord_var_neff_dims, char *orig_coord_att,
+	int ncid );
 static int  determine_lat_lon( char *s_in, int *is_lat, int *is_lon );
 
 /* Variables local to routines in this file */
@@ -88,130 +98,6 @@ close_enough( float data, float fill )
 	return( retval );
 }
 
-/*******************************************************************************
- * Adds the given string to the list, and returns a pointer to the 
- * new list element.
- */
-	Stringlist *
-add_to_stringlist( Stringlist **list, char *new_string, void *aux )
-{
-	Stringlist 	*cursor, *new_el;
-	int		i;
-
-	new_stringlist( &new_el );
-	new_el->string = (char *)malloc( strlen( new_string )+1);
-	if( new_el == NULL ) {
-		fprintf( stderr, "ncview: add_to_stringlist: malloc failed\n" );
-		fprintf( stderr, "string trying to add: %s\n", new_string );
-		exit( -1 );
-		}
-	strcpy( new_el->string, new_string );
-	new_el->aux    = aux;
-
-	i = 0;
-	if( *list == NULL ) {
-		*list = new_el;
-		new_el->prev = NULL;
-		}
-	else
-		{
-		i = 1;
-		cursor = *list;
-		while( cursor->next != NULL ) {
-			cursor = cursor->next;
-			i++;
-			}
-		cursor->next = new_el;
-		new_el->prev = cursor;
-		}
-	new_el->index = i;
-
-	return( new_el );
-}
-
-/*******************************************************************************
- * Adds the given string to the list, and returns a pointer to the 
- * new list element, with alphabetic ordering.
- */
-	Stringlist *
-add_to_stringlist_ordered( Stringlist **list, char *new_string, void *aux )
-{
-	Stringlist 	*cursor, *new_el, *prev_el;
-	int		i;
-
-	new_stringlist( &new_el );
-	new_el->string = (char *)malloc( strlen( new_string )+1);
-	if( new_el == NULL ) {
-		fprintf( stderr, "ncview: add_to_stringlist: malloc failed\n" );
-		fprintf( stderr, "string trying to add: %s\n", new_string );
-		exit( -1 );
-		}
-	strcpy( new_el->string, new_string );
-	new_el->aux    = aux;
-
-	i = 0;
-	if( *list == NULL ) {
-		*list = new_el;
-		new_el->prev = NULL;
-		}
-	else
-		{
-		i = 1;
-		cursor = *list;
-		prev_el = NULL;
-		while( (cursor != NULL) && (strcmp( new_string, cursor->string) > 0)) {
-			prev_el = cursor;
-			cursor  = cursor->next;
-			i++;
-			}
-		if( cursor == NULL ) {
-			prev_el->next = new_el;
-			new_el->prev  = prev_el;
-			}
-		else if( prev_el == NULL ) {
-			*list = new_el;
-			new_el->next = cursor;
-			cursor->prev = new_el;
-			}
-		else
-			{
-			new_el->next = cursor;
-			cursor->prev = new_el;
-			prev_el->next = new_el;
-			new_el->prev  = prev_el;
-			}
-		}
-	new_el->index = i;
-
-	return( new_el );
-}
-
-
-/*******************************************************************************
- * Concatenate onto a stringlist
- */
-	void
-sl_cat( Stringlist **dest, Stringlist **src )
-{
-	Stringlist *sl;
-
-	sl = *src;
-	while( sl != NULL ) {
-		add_to_stringlist( dest, sl->string, NULL );
-		sl = sl->next;
-		}
-}
-
-/*******************************************************************************
- * Allocate space for a new Stringlist element 
- */
-	void
-new_stringlist( Stringlist **el )
-{
-	(*el)       = (Stringlist *)malloc( sizeof( Stringlist ));
-	(*el)->next = NULL;
-}
-
 /******************************************************************************
  * Add the passed NCVar element to the list 
  */
@@ -264,7 +150,7 @@ new_fdblist( FDBlist **el )
 	(*el)->recdim_units = (char *)malloc( MAX_RECDIM_UNITS_LEN );
 
 #ifdef HAVE_UDUNITS2
-	(*el)->udunits	    = (utUnit *)malloc( sizeof(utUnit) );
+	(*el)->ut_unit_ptr  = NULL;
 #endif
 
 	strcpy( (*el)->filename, "UNINITIALIZED" );
@@ -295,18 +181,6 @@ new_netcdf( NetCDFOptions **n )
 }
 
 /******************************************************************************
- * What's in this stringlist, anyway?
- */
-	void
-dump_stringlist( Stringlist *s )
-{
-	while( s != NULL ) {
-		printf( "%d: %s\n", s->index, s->string );
-		s = s->next;
-		}
-}
-
-/******************************************************************************
  * Return 1 if any data value is missing, 0 otherwise
  */
 	int
@@ -373,10 +247,15 @@ data_to_pixels( View *v )
 
 	fill_value = v->variable->fill_value;
 
-	if( blowup > 0 )
-		expand_data( scaled_data, v );
+	if( blowup > 0 ) {
+		if( options.debug ) printf( "..expanding data, blowup=%ld\n", blowup );
+		expand_data( scaled_data, v, new_x_size*new_y_size );
+		}
 	else
+		{
+		if( options.debug ) printf( "..contracting data, blowup=%ld\n", blowup );
 		contract_data( scaled_data, v, fill_value );
+		}
 
 	data_range = v->variable->user_max - v->variable->user_min;
 
@@ -482,6 +361,7 @@ data_to_pixels( View *v )
 			*(v->pixels + i + j*new_x_size) = pix_val;
 			}
 		}
+
 	free( scaled_data );
 	return( 0 );
 }
@@ -506,25 +386,6 @@ n_vars_in_list( NCVar *v )
 }
 
 /******************************************************************************
- * Returns the number of entries in the Stringlist
- */
-	int
-n_strings_in_list( Stringlist *s )
-{
-	Stringlist *c;
-	int	   i;
-
-	i = 0;
-	c = s;
-	while( c != NULL ) {
-		i++;
-		c = c->next;
-		}
-
-	return( i );
-}
-	
-/******************************************************************************
  * Given a list of variable *names*, initialize the variable *structure* and
  * add it to the global list of variables.  Input arg 'nfiles' is the total
  * number of files indicated on the command line, this can be useful for 
@@ -556,7 +417,7 @@ add_vars_to_list( Stringlist *var_list, int id, char *filename, int nfiles )
 add_var_to_list( char *var_name, int file_id, char *filename, int nfiles )
 {
 	NCVar	*var, *new_var;
-	int	n_dims, err;
+	int	n_dims, i;
 	FDBlist	*new_fdb, *fdb;
 
 	/* make a new file description entry for this var/file combo */
@@ -575,9 +436,7 @@ add_var_to_list( char *var_name, int file_id, char *filename, int nfiles )
 	 */
 	fi_fill_aux_data( file_id, var_name, new_fdb );
 #ifdef HAVE_UDUNITS2
-	err = utScan( new_fdb->recdim_units, new_fdb->udunits );
-	if( err != 0 )
-		new_fdb->udunits = NULL;
+	new_fdb->ut_unit_ptr = ut_parse( unitsys, new_fdb->recdim_units, UT_ASCII ); /* Will be NULL if there was an error */
 #endif
 
 	/* Does this variable already have an entry on the global var list "variables"? */
@@ -603,10 +462,23 @@ add_var_to_list( char *var_name, int file_id, char *filename, int nfiles )
 		new_var->fill_value = DEFAULT_FILL_VALUE;
 		fi_fill_value( new_var, &(new_var->fill_value) );
 		new_fdb->prev       = NULL;
+		new_fdb->index      = 0;	/* Since this is the FIRST fdb for this var */
+
+		/* Init the dim mapping info */
+		new_var->scalar_dim_map_info = (NCDim_map_info **)malloc( sizeof( NCDim_map_info * ) * MAX_SCALAR_COORDS );
+		if( new_var->scalar_dim_map_info == NULL ) {
+			fprintf( stderr, "Error allocating space for scalar coordinates\n" );
+			exit(-1);
+			}
+		for( i=0; i<MAX_SCALAR_COORDS; i++ )
+			new_var->scalar_dim_map_info[i] = NULL;
+		new_var->n_scalar_coords = 0;
 		handle_dim_mapping( new_var );	/* needs to be before fill_dim_structs cuz latter access fi_dim_info */
+
 		fill_dim_structs( new_var );
 		add_to_varlist  ( &variables, new_var );
 		new_var->is_virtual = FALSE;
+
 		}
 	else	/* YES -- just add the FDB to the list of files in which 
 		 * this variable appears, and accumulate the variable's size.
@@ -626,13 +498,135 @@ add_var_to_list( char *var_name, int file_id, char *filename, int nfiles )
 			fdb = fdb->next;
 		fdb->next         = new_fdb;
 		new_fdb->prev     = fdb;
+		new_fdb->index    = ((FDBlist *)(new_fdb->prev))->index + 1;	/* so index for this fdb is 1 more than index for prev one */
 		var->last_file    = new_fdb;
-		*(var->size)      += *(new_fdb->var_size);
+		*(var->size)      += *(new_fdb->var_size);	/* this works b/c you can only concatenate across first (timelike) dim */
 		var->is_virtual   = TRUE;
 		}
 }
 
 /******************************************************************************
+ * Go through each variable, and if it has scalar coordinate information,
+ * read that in from each file that the var lives in.
+ */
+ 	void
+ cache_scalar_coord_info( NCVar *vars )
+ {
+ 	NCVar		*v;
+	FDBlist		*tfile;
+	int		nfiles, ifile, nsc, isc;
+	NCDim_map_info	*dmi;
+	float		fval;
+	size_t		zeros[MAX_NC_DIMS], ones[MAX_NC_DIMS], n_ts, ii, i_cursor, n_ts_this_file;
+
+	/* Allocate space for the timestep_2_fdb array. This points
+	 * to the file (FDBlist) associated with EACH TIMESTEP of
+	 * the variable
+	 */
+	v = vars;
+	while( v != NULL ) {
+		n_ts = v->size[0];	/* total number of timesteps across ALL files */
+		if( n_ts > 0 ) {
+			if( options.debug )
+				printf( "Constructing timestep_2_fdb array for var %s, which has %ld timesteps\n", v->name, n_ts );
+			/* One FDBlist pointer for each timestep of the var */
+			v->timestep_2_fdb = (FDBlist **)malloc( sizeof( FDBlist *) * n_ts );
+			if( v->timestep_2_fdb == NULL ) {
+				fprintf( stderr, "Error, failed to allocate space for FDBlist pointer block of length %ld!\n",
+						n_ts );
+				exit(-1);
+				}
+
+			tfile = v->first_file;
+			i_cursor = 0L;
+			while( tfile != NULL ) {
+				/* Set all FDBpointers for the timesteps in THIS file 
+				 * to point to this file
+				 */
+				n_ts_this_file = tfile->var_size[0];
+				if( options.debug )
+					printf( "%ld timesteps of var %s are in file %s\n", n_ts_this_file, v->name, tfile->filename ); 
+				for( ii=0; ii<n_ts_this_file; ii++ ) 
+					v->timestep_2_fdb[i_cursor++] = tfile;
+				tfile = tfile->next;
+				}
+			if( i_cursor != n_ts ) {
+				fprintf( stderr, "Internal error: in routine cache_scalar_coord_info, got a total length of the unlimited dim in var %s to be %ld, but when setting pointers to the files, there seemd to be only %ld entries\n",
+					v->name, n_ts, i_cursor );
+				exit(-1);
+				}
+			}
+		v = v->next;
+		}
+
+	/* These will be used as the start (zeros) and count (ones)
+	 * to get the scalar data
+	 */
+	for( isc=0; isc<MAX_NC_DIMS; isc++ ) {
+		zeros[isc] = 0L;
+		ones[isc]  = 1L;
+		}
+
+	v = vars;
+	while( v != NULL ) {
+		nsc = v->n_scalar_coords;
+		if( nsc > 0 ) {
+			tfile = v->first_file;
+
+			/* How many files does this var live in? */
+			nfiles = 0;
+			while( tfile != NULL ) {
+				nfiles++;
+				tfile = tfile->next;
+				}
+			if( options.debug )
+				printf( "Making cache for the %d SCALAR coordinates of variable %s, which lives in %d files\n", nsc, v->name, nfiles );
+
+			/* We hold the values of the scalar coords in the data_cache */
+			for( isc=0; isc<nsc; isc++ ) {	
+				dmi = v->scalar_dim_map_info[isc];
+				dmi->data_cache = (float *)malloc( sizeof(float) * nfiles ); /* one val per FILE (not timestep) */
+				if( dmi->data_cache == NULL ) {
+					fprintf( stderr, "Error, failed to allocate space for %d scalar coord vals\n", nfiles );
+					exit(-1);
+					}
+				}
+
+			/* Go through each file and read in the vals of all the scalar coords */
+			tfile = v->first_file;
+			for( ifile=0; ifile<nfiles; ifile++ ) {
+				for( isc=0; isc<nsc; isc++ ) {	
+					dmi = v->scalar_dim_map_info[isc];
+					if( dmi == NULL ) {
+						fprintf( stderr, "Coding error, uninitialized pointer to a scalar dim info struct is being used\n" );
+						exit(-1);
+						}
+					netcdf_fi_get_data( tfile->id, dmi->coord_var_name, zeros, ones, &fval, NULL );
+					if( options.debug ) printf( "In file %d/%d, value of scalar coord \"%s\" is %f %s\n",
+						ifile, nfiles, dmi->coord_var_name, fval, dmi->coord_var_units );
+					dmi->data_cache[ifile] = fval;
+					}
+				tfile = tfile->next;
+				}
+
+			/* Now see if all the scalar values are the same */
+			for( isc=0; isc<nsc; isc++ ) {	
+				dmi = v->scalar_dim_map_info[isc];
+				dmi->scalar_all_same = 1;	
+				if( nfiles > 1 ) {
+					for( ifile=1; ifile<nfiles; ifile++ ) {
+						if( dmi->data_cache[ifile] != dmi->data_cache[0] ) 
+							dmi->scalar_all_same = 0;
+						}
+					}
+				}
+			}
+
+		v = v->next;
+		}
+ }
+
+/******************************************************************************
  * Calculate the min and max values for the passed variable.
  */
 	void
@@ -933,21 +927,21 @@ virt_to_actual_place( NCVar *var, size_t *virt_pl, size_t *act_pl, FDBlist **fil
 /******************************************************************************
  * Initialize the var->dim_map_info table
  */
-	void
+	static void
 handle_dim_mapping( NCVar *v )
 {
-	int	i, j, found_match, varid, ncid, must_be_left_of, n_matches,
-		is_lat, is_lon, idx_lat_dim, idx_lon_dim, err,
-		coord_var_eff_size[MAX_NC_DIMS], coord_var_neff_dims;
+	int	i, varid, ncid, coord_var_ndims, coord_var_neff_dims;
+	size_t	coord_var_eff_size[MAX_NC_DIMS], *coord_var_size; 
 	char	*coord_att, *s, orig_coord_att[1024];
-	NCDim_map_info	*map_info;
 	const 	char *delim = " \n\0\t";
-	size_t	totsize, start[MAX_NC_DIMS], count[MAX_NC_DIMS];
 
 	if( options.debug ) printf( "handle_dim_mapping: entering for var %s\n", v->name );
 
 	ncid = v->first_file->id;
 
+	/* dim_map_info itself is never NULL. If the var has no coordinate mappings,
+	 * then this will point to an array each entry of which is NULL.
+	 */
 	v->dim_map_info = (NCDim_map_info **)malloc( sizeof(NCDim_map_info *) * v->n_dims );
 	for( i=0; i<v->n_dims; i++ )
 		(v->dim_map_info)[i] = (NCDim_map_info *)NULL;
@@ -975,36 +969,11 @@ handle_dim_mapping( NCVar *v )
 		varid = safe_ncvarid( ncid, s );
 		if( varid != -1 ) {	/* yes, the token "s" matches the name of a var in the file! */
 
-			/* Make new, uninitialized dim_map_info structure */
-			map_info = (NCDim_map_info *)malloc( sizeof(NCDim_map_info) );
-			map_info->coord_att = (char *)malloc( sizeof(char)*(strlen(coord_att)+2));
-			strcpy( map_info->coord_att, coord_att );
-
-			/* This is the "variable that I map" */
-			map_info->var_i_map = v;
-
-			/* Since "s" matches a var name, it must be the coordinate variable name in particular */
-			map_info->coord_var_name = (char *)malloc( strlen(s) + 2 );
-			strcpy( map_info->coord_var_name, s );
-
-			if( options.debug ) printf( "Coord var named >%s< is used to map a dimension of var %s\n", 
-					s, v->name );
-
-			/* See how many dims this coord var has */
-			map_info->coord_var_ndims = netcdf_n_dims( ncid, s );
-
-			/* Get size of the coord var */
-			map_info->coord_var_size = netcdf_fi_var_size( ncid, s );
-
-			if( options.debug ) {
-				printf( "Coord var %s has %d dims, here are their sizes: ",
-					s, map_info->coord_var_ndims );
-				for( i=0; i<map_info->coord_var_ndims; i++ )
-					printf( "%d ", map_info->coord_var_size[i] );
-				printf( "\n" );
-				}
-
-			/* Right now, I'm only going to try to handle 2-D mapping dims.
+			/* Right now, I'm only going to try to handle either scalar (0d)
+			 * or 2-D mapping dims.  Scalar mapping dims just give an 
+			 * additional location where the data is valid; for example,
+			 * the data might be a 2d field in (lon,lat) and have a 
+			 * "height" coordinate that tells the height the data is at.
 			 * If the dim is more complicated than that, then we simply
 			 * ignore the mapping.  In particular, the test WRF output file
 			 * I have has a 3-D mapping dim with time as the first time.
@@ -1013,209 +982,319 @@ handle_dim_mapping( NCVar *v )
 			 * but otherwise, if the mapping var has more than 2 effective
 			 * dims, then forget it.
 			 */
+			coord_var_ndims = netcdf_n_dims( ncid, s );
+			coord_var_size = netcdf_fi_var_size( ncid, s );
 			coord_var_neff_dims = 0;
-			for( i=0; i<map_info->coord_var_ndims; i++ )
-				if( map_info->coord_var_size[i] > 1 ) {
-					coord_var_eff_size[coord_var_neff_dims] = map_info->coord_var_size[i];
+			for( i=0; i<coord_var_ndims; i++ )
+				if( coord_var_size[i] > 1 ) {
+					coord_var_eff_size[coord_var_neff_dims] = coord_var_size[i];
 					coord_var_neff_dims++;
 					}
 
-			if( (options.debug) && (coord_var_neff_dims != 2)) {
+			/* These routines are where we do most of the work
+			 */
+			if( coord_var_neff_dims == 0 ) 
+				handle_dim_mapping_scalar( v, s, coord_att );
+
+			else if( coord_var_neff_dims == 2 ) 
+				handle_dim_mapping_2d( v, s, coord_att, coord_var_eff_size, coord_var_neff_dims,
+					orig_coord_att, ncid );
+
+			else
+				{
 				printf( "Note: the coordinates attribute for variable %s is being ignored,\n", v->name );
 				printf( "since it specifies a variable (%s) that has %d effective dims (an effective dim has a size greater than 1)\n", 
-					map_info->coord_var_name, coord_var_neff_dims );
-				printf( "I am not set up to handle cases with coordinate mapping using anything other than 2 effective dims\n" );
+					s, coord_var_neff_dims );
+				printf( "I am not set up to handle cases with coordinate mapping using anything other than 0 or 2 effective dims\n" );
 				return;
 				}
+			}
+		else
+			{
+			/* varid == -1, indicating no var of this name was found in the file */
+			if( options.debug )
+				printf( "Warning: token \"%s\" appears in a coordinates attribute yet is NOT a var in the file\n", s );
+			}
 
-			/* Get array of boolean indicating which dims in the 
-			 * base var match the shape of this coord var.  For
-			 * instance, if we have a var of shape (10,20,180,360)
-			 * and a coord var of shape (180,360) then this indicating
-			 * array will be 0,0,1,1.
-			 */
-			map_info->matching_var_dims  = (int *)   malloc( sizeof(int)    * v->n_dims );
-			map_info->index_place_factor = (size_t *)malloc( sizeof(size_t) * v->n_dims );
-			for( i=0; i<v->n_dims; i++ ) {
-				map_info->matching_var_dims [i] = 0;
-				map_info->index_place_factor[i] = 0;
-				}
+		s = strtok( NULL, delim );
+		}
+}
 
-			/* We could have a problem if the dim sizes are repeated instead of unique.
-			 * For example, imagine a square data array of size [n,n].  Then we have
-			 * a lon mapping array of size [n,n].  We don't want the boolean array
-			 * 'matching_var_dims' to end up as [0,1], we want it to end up as [1,1].
-			 * In other words, stop a dim in the coord var from matching the same dim
-			 * in the original var twice, even if the dim size is repeated.  We do this
-			 * by fist finding a match, then requiring the NEXT match to be to the
-			 * left of (in the array of the var's dim sizes) the previous match.
-			 */
-			must_be_left_of = v->n_dims;	/* Start out by setting all the way to right edge */
-			for( i=map_info->coord_var_ndims-1; i>=0; i--) {/* Want to find a dim in v that matches size of coord_var dim number i... */
-				/*
-				fprintf( stderr, "Searching for a dim in var %s that matches dim number %d in %s, which is of size %d\n",
-					v->name, i, s, coord_var_eff_size[i] );
-				fprintf( stderr, "the match must be to the left of %d\n", must_be_left_of );
-				*/
-				for( j=must_be_left_of-1; j>=0; j-- ) {	/* ...subject to constraint that match be left of (have lower numerical value then) j */
-					if( coord_var_eff_size[i] == v->size[j] ) {
-						map_info->matching_var_dims[j] = 1;
-						must_be_left_of = j;	/* found a match at j, so NEXT match must be at a lower value of j than this */
-						break;
-						}
-					}
-				}
+/**********************************************************************************************/
+	static void
+handle_dim_mapping_scalar( NCVar *v, char *coord_var_name, char *coord_att )
+{
+	NCDim_map_info	*tmi;
 
-			n_matches = 0;
-			for( i=0; i<v->n_dims; i++ )
-				n_matches += map_info->matching_var_dims[i];
-			if( n_matches != coord_var_neff_dims ) {
-				fprintf( stderr, "Warning: did not correctly match mapped dims specified in the coordinates attribute to dims in the variable\n" );
-				fprintf( stderr, "Problem encountered on variable \"%s\" which has shape (", v->name );
-				for( i=0; i<v->n_dims; i++ ) {
-					fprintf( stderr, "%d", v->size[i] );
-					if( i < (v->n_dims-1))
-						fprintf( stderr, "," );
-					}
-				fprintf( stderr, ")\n" );
-				fprintf( stderr, "and has coordinates attribute \"%s\"\n", orig_coord_att );
-				fprintf( stderr, "The problem is that coordinate var \"%s\" has shape (", s );
-				for( i=0; i<map_info->coord_var_ndims; i++ ) {
-					fprintf( stderr, "%d", map_info->coord_var_size[i] );
-					if( i < (map_info->coord_var_ndims-1))
-						fprintf( stderr, "," );
-					}
-				fprintf( stderr, "), which does not match dimensions in the variable being mapped!\n" );
-				fprintf( stderr, "Abandoning coordinate mapping for this variable\n-------------\n" );
-				for( i=0; i<v->n_dims; i++ )
-					(v->dim_map_info)[i] = (NCDim_map_info *)NULL;
-				return;
-				}
-			if( (n_matches<1) || (n_matches>2)) {
-				fprintf( stderr, "(Location B) Error, did not correctly match mapped dims specified in the coordinates attribute to dims in the variable\n" );
-				fprintf( stderr, "(Location B) Please send email to dpierce at ucsd.edu letting me know what your coordinates attribute looks like so I can fix this problem.\n" );
-				fprintf( stderr, "Problem encountered on variable \"%s\"\n", v->name );
-				fprintf( stderr, "which has coordinates attribute \"%s\"\n", orig_coord_att );
-				fprintf( stderr, "Abandoning coordinate mapping for this variable\n" );
-				for( i=0; i<v->n_dims; i++ )
-					(v->dim_map_info)[i] = (NCDim_map_info *)NULL;
-				return;
-				}
+	if( v->n_scalar_coords >= MAX_SCALAR_COORDS ) {
+		printf( "Note: var %s has exceeded the allowable number of scalar coordinate dimensions, which is %d. Ignoring the rest\n",
+			v->name, MAX_SCALAR_COORDS);
+		return;
+		}
 
-			/* Try to figure out if this dim is 'latitude' like
-			 * or 'longitude' like....these are the only options
-			 * for now. 
-			 */
-			err = determine_lat_lon( map_info->coord_var_name, &is_lat, &is_lon );
-			if( err != 0 ) {
-				/* Abort this process */
-				for( i=0; i<v->n_dims; i++ )
-					(v->dim_map_info)[i] = (NCDim_map_info *)NULL;
-				return;
-				}
-			idx_lon_dim = -1;
-			idx_lat_dim = -1;
-			if( is_lon ) {
-				if( options.debug ) printf( "Coord var was found to be a LONGITUDE\n" );
-				/* Match this coord var to the last one on the right */
-				for( i=v->n_dims-1; i>=0; i-- ) {
-					if( map_info->matching_var_dims[i] == 1 ) {
-						v->dim_map_info[i] = map_info;
-						idx_lon_dim = i;
-						if( options.debug )
-							printf( "In variable \"%s\", dimension \"%s\" is mapped by LONGITUDE-like %d-dimensional variable \"%s\"\n",
-							v->name, netcdf_dim_id_to_name( v->first_file->id, v->name, i), 
-							map_info->coord_var_ndims, map_info->coord_var_name );
-						break;
-						}
-					}
-				/* Now, since we've found the index of the lon dim, the
-				 * index of the lat dim must be the other one
-				 */
-				for( i=0; i<v->n_dims; i++ ) 
-					if( (map_info->matching_var_dims[i] == 1) && (i != idx_lon_dim))
-						idx_lat_dim = i;
-				}
-			else if( is_lat ) {
-				if( options.debug ) printf( "Coord var was found to be a LATITUDE\n" );
-				/* Match this coord var to the first one on the left */
-				for( i=0; i<v->n_dims; i++ ) {
-					if( map_info->matching_var_dims[i] == 1 ) {
-						idx_lat_dim = i;
-						v->dim_map_info[i] = map_info;
-						if( options.debug )
-							printf( "In variable \"%s\", dimension \"%s\" is mapped by LATITUDE-like dimension %d-dimensional variable \"%s\"\n",
-							v->name, netcdf_dim_id_to_name( v->first_file->id, v->name, i),
-							map_info->coord_var_ndims, map_info->coord_var_name );
-						break;
-						}
-					}
-				/* Now, since we've found the index of the lat dim, the
-				 * index of the lon dim must be the other one
-				 */
-				for( i=0; i<v->n_dims; i++ ) 
-					if( (map_info->matching_var_dims[i] == 1) && (i != idx_lat_dim))
-						idx_lon_dim = i;
-				}
-			else
-				{
-				fprintf( stderr, "(Location C)Error, did not correctly match mapped dims specified in the coordinates attribute to dims in the variable\n" );
-				fprintf( stderr, "(Location C)Please send email to dpierce at ucsd.edu letting me know what your coordinates attribute looks like so I can fix this problem.\n" );
-				exit( -1 );
-				}
+	/* Make a new SCALAR dim map info structure to 
+	 * hold our single value
+	 */
+	tmi = (NCDim_map_info *)malloc( sizeof(NCDim_map_info) );
 
-			/* Read in data from var, store it in cache */
-			totsize = 1L;
-			for( i=0; i<map_info->coord_var_ndims; i++ ) {
-				totsize *= map_info->coord_var_size[i];
-				start[i] = 0L;
-				count[i] = map_info->coord_var_size[i];
-				}
-			map_info->data_cache = (float *)malloc( totsize*sizeof(float) );
-			if( map_info->data_cache == NULL ) {
-				fprintf( stderr, "Error, could not allocate cache for dim map variable %s; total size (bytes): %ld\n", 
-					map_info->coord_var_name, totsize*sizeof(float) );
-				exit(-1);
-				}
-			netcdf_fi_get_data( ncid, map_info->coord_var_name, start, count, map_info->data_cache, NULL );
+	/* Copy info to the new scalar dim map structure
+	 */
+	tmi->var_i_map = v;
+	tmi->coord_var_name = (char *)malloc( sizeof(char) * (strlen(coord_var_name) + 1));
+	strcpy( tmi->coord_var_name, coord_var_name );
+	tmi->coord_var_units = fi_var_units( v->first_file->id, coord_var_name );
+	tmi->scalar_all_same = 0;
+
+	/* Add this new scalar dim to the array */
+	v->scalar_dim_map_info[v->n_scalar_coords] = tmi;
+	(v->n_scalar_coords)++;
+
+	if( options.debug ) printf("Added a new scalar coord to var %s: name=%s count=%d\n",
+		v->name, coord_var_name, v->n_scalar_coords );
+
+	/* Note that we CANNOT fill out the data values for this "scalar" coord var 
+	 * yet. The reason is because this var might live in multiple files, and
+	 * each file could have a different value of the scalar variable. I.e., 
+	 * the scalar coord var could be used to essentially add another unlimited
+	 * dimension to the variable. To handle this, we must read in the 
+	 * scalar values from EACH FILE after we know what all the files this
+	 * variable lives in are. That happens in the routine that calls this
+	 * one, add_var_to_list
+	 */
+}
 
-			if( n_matches == 1 ) {
-				if( idx_lon_dim == -1 )
-					map_info->index_place_factor[idx_lat_dim] = 1L;
-				else
-					map_info->index_place_factor[idx_lon_dim] = 1L;
-				}
-			else if( n_matches == 2 ) {
-				map_info->index_place_factor[idx_lon_dim] = 1L;
-				map_info->index_place_factor[idx_lat_dim] = v->size[ idx_lon_dim ];
-				}
-			else
-				{
-				fprintf( stderr, "(Location D)Error, did not correctly match mapped dims specified in the coordinates attribute to dims in the variable\n" );
-				fprintf( stderr, "(Location D)Please send email to dpierce at ucsd.edu letting me know what your coordinates attribute looks like so I can fix this problem.\n" );
-				exit( -1 );
+/****************************************************************************************************/
+	static void
+handle_dim_mapping_2d( NCVar *v, char *coord_var_name, char *coord_att, size_t *coord_var_eff_size,
+		int coord_var_neff_dims, char *orig_coord_att, int ncid )
+{
+	NCDim_map_info	*map_info;
+	size_t		totsize, start[MAX_NC_DIMS], count[MAX_NC_DIMS];
+	int		i, n_matches, err, is_lat, is_lon, idx_lat_dim, idx_lon_dim,
+			must_be_left_of, j;
+
+	/* Make new, uninitialized dim_map_info structure */
+	map_info = (NCDim_map_info *)malloc( sizeof(NCDim_map_info) );
+	if( map_info == NULL ) {
+		fprintf( stderr, "Error, could not allocate space for a dim mapping info structure\n" );
+		exit(-1);
+		}
+
+	/* Copy over the coordinate attribute for posterity */
+	map_info->coord_att = (char *)malloc( sizeof(char)*(strlen(coord_att)+2));
+	if( map_info->coord_att == NULL ) {
+		fprintf( stderr, "Error, failed to allocate space to copy the coordinate attribute\n" );
+		exit(-1);
+		}
+	strcpy( map_info->coord_att, coord_att );
+
+	/* This is the "variable that I map" */
+	map_info->var_i_map = v;
+
+	/* Since "coord_var_name" matches a var name, it must be the coordinate variable name in particular.
+	 * The coordinate variable is the var in the file that holds mapping info 
+	 */
+	map_info->coord_var_name = (char *)malloc( strlen(coord_var_name) + 2 );
+	if( map_info->coord_att == NULL ) {
+		fprintf( stderr, "Error, failed to allocate space to copy the coordinate variable name\n" );
+		exit(-1);
+		}
+	strcpy( map_info->coord_var_name, coord_var_name );
+
+	if( options.debug ) printf( "Coord var named >%s< is a NON-SCALAR coord used to map a dimension of var %s\n", 
+			coord_var_name, v->name );
+
+	/* See how many dims this coord var has */
+	map_info->coord_var_ndims = netcdf_n_dims( ncid, coord_var_name );
+
+	/* Get size of the coord var */
+	map_info->coord_var_size = netcdf_fi_var_size( ncid, coord_var_name );
+
+	if( options.debug ) {
+		printf( "non-scalar Coord var %s has %d dims, here are their sizes: ",
+			coord_var_name, map_info->coord_var_ndims );
+		for( i=0; i<map_info->coord_var_ndims; i++ )
+			printf( "%ld ", map_info->coord_var_size[i] );
+		printf( "\n" );
+		}
+
+	/* Get array of boolean indicating which dims in the 
+	 * base var match the shape of this coord var.  For
+	 * instance, if we have a var of shape (10,20,180,360)
+	 * and a coord var of shape (180,360) then this indicating
+	 * array will be 0,0,1,1.
+	 */
+	map_info->matching_var_dims  = (int *)   malloc( sizeof(int)    * v->n_dims );
+	map_info->index_place_factor = (size_t *)malloc( sizeof(size_t) * v->n_dims );
+	for( i=0; i<v->n_dims; i++ ) {
+		map_info->matching_var_dims [i] = 0;
+		map_info->index_place_factor[i] = 0;
+		}
+
+	/* We could have a problem if the dim sizes are repeated instead of unique.
+	 * For example, imagine a square data array of size [n,n].  Then we have
+	 * a lon mapping array of size [n,n].  We don't want the boolean array
+	 * 'matching_var_dims' to end up as [0,1], we want it to end up as [1,1].
+	 * In other words, stop a dim in the coord var from matching the same dim
+	 * in the original var twice, even if the dim size is repeated.  We do this
+	 * by fist finding a match, then requiring the NEXT match to be to the
+	 * left of (in the array of the var's dim sizes) the previous match.
+	 */
+	must_be_left_of = v->n_dims;	/* Start out by setting all the way to right edge */
+	for( i=map_info->coord_var_ndims-1; i>=0; i--) {/* Want to find a dim in v that matches size of coord_var dim number i... */
+		/*
+		fprintf( stderr, "Searching for a dim in var %s that matches dim number %d in %s, which is of size %d\n",
+			v->name, i, s, coord_var_eff_size[i] );
+		fprintf( stderr, "the match must be to the left of %d\n", must_be_left_of );
+		*/
+		for( j=must_be_left_of-1; j>=0; j-- ) {	/* ...subject to constraint that match be left of (have lower numerical value then) j */
+			if( coord_var_eff_size[i] == v->size[j] ) {
+				map_info->matching_var_dims[j] = 1;
+				must_be_left_of = j;	/* found a match at j, so NEXT match must be at a lower value of j than this */
+				break;
 				}
+			}
+		}
 
-			/*
-			printf( "matching var dims: " );
-			for( i=0; i<v->n_dims; i++ )
-				printf( "%d ", map_info->matching_var_dims[i] );
-			printf( "Index place factor: " );
-			for( i=0; i<v->n_dims; i++ )
-				printf( "%ld ", map_info->index_place_factor[i] );
-			printf( "\n" );
-			*/
+	n_matches = 0;
+	for( i=0; i<v->n_dims; i++ )
+		n_matches += map_info->matching_var_dims[i];
+	if( n_matches != coord_var_neff_dims ) {
+		fprintf( stderr, "Warning: did not correctly match mapped dims specified in the coordinates attribute to dims in the variable\n" );
+		fprintf( stderr, "Problem encountered on variable \"%s\" which has shape (", v->name );
+		for( i=0; i<v->n_dims; i++ ) {
+			fprintf( stderr, "%ld", v->size[i] );
+			if( i < (v->n_dims-1))
+				fprintf( stderr, "," );
+			}
+		fprintf( stderr, ")\n" );
+		fprintf( stderr, "and has coordinates attribute \"%s\"\n", orig_coord_att );
+		fprintf( stderr, "The problem is that coordinate var \"%s\" has shape (", coord_var_name );
+		for( i=0; i<map_info->coord_var_ndims; i++ ) {
+			fprintf( stderr, "%ld", map_info->coord_var_size[i] );
+			if( i < (map_info->coord_var_ndims-1))
+				fprintf( stderr, "," );
+			}
+		fprintf( stderr, "), which does not match dimensions in the variable being mapped!\n" );
+		fprintf( stderr, "Abandoning coordinate mapping for this variable\n-------------\n" );
+		for( i=0; i<v->n_dims; i++ )
+			(v->dim_map_info)[i] = (NCDim_map_info *)NULL;
+		return;
+		}
+	if( (n_matches<1) || (n_matches>2)) {
+		fprintf( stderr, "(Location B) Error, did not correctly match mapped dims specified in the coordinates attribute to dims in the variable\n" );
+		fprintf( stderr, "(Location B) Please send email to dpierce at ucsd.edu letting me know what your coordinates attribute looks like so I can fix this problem.\n" );
+		fprintf( stderr, "Problem encountered on variable \"%s\"\n", v->name );
+		fprintf( stderr, "which has coordinates attribute \"%s\"\n", orig_coord_att );
+		fprintf( stderr, "Abandoning coordinate mapping for this variable\n" );
+		for( i=0; i<v->n_dims; i++ )
+			(v->dim_map_info)[i] = (NCDim_map_info *)NULL;
+		return;
+		}
 
+	/* Try to figure out if this dim is 'latitude' like
+	 * or 'longitude' like....these are the only options
+	 * for now. 
+	 */
+	err = determine_lat_lon( map_info->coord_var_name, &is_lat, &is_lon );
+	if( err != 0 ) {
+		/* Abort this process */
+		for( i=0; i<v->n_dims; i++ )
+			(v->dim_map_info)[i] = (NCDim_map_info *)NULL;
+		return;
+		}
+	idx_lon_dim = -1;
+	idx_lat_dim = -1;
+	if( is_lon ) {
+		if( options.debug ) printf( "Coord var was found to be a LONGITUDE\n" );
+		/* Match this coord var to the last one on the right */
+		for( i=v->n_dims-1; i>=0; i-- ) {
+			if( map_info->matching_var_dims[i] == 1 ) {
+				v->dim_map_info[i] = map_info;
+				idx_lon_dim = i;
+				if( options.debug )
+					printf( "In variable \"%s\", dimension \"%s\" is mapped by LONGITUDE-like %d-dimensional variable \"%s\"\n",
+					v->name, netcdf_dim_id_to_name( v->first_file->id, v->name, i), 
+					map_info->coord_var_ndims, map_info->coord_var_name );
+				break;
+				}
 			}
-		else
-			{
-			if( options.debug )
-				printf( "Warning: token \"%s\" appears in a coordinates attribute yet is NOT a var in the file\n", s );
+		/* Now, since we've found the index of the lon dim, the
+		 * index of the lat dim must be the other one
+		 */
+		for( i=0; i<v->n_dims; i++ ) 
+			if( (map_info->matching_var_dims[i] == 1) && (i != idx_lon_dim))
+				idx_lat_dim = i;
+		}
+	else if( is_lat ) {
+		if( options.debug ) printf( "Coord var was found to be a LATITUDE\n" );
+		/* Match this coord var to the first one on the left */
+		for( i=0; i<v->n_dims; i++ ) {
+			if( map_info->matching_var_dims[i] == 1 ) {
+				idx_lat_dim = i;
+				v->dim_map_info[i] = map_info;
+				if( options.debug )
+					printf( "In variable \"%s\", dimension \"%s\" is mapped by LATITUDE-like dimension %d-dimensional variable \"%s\"\n",
+					v->name, netcdf_dim_id_to_name( v->first_file->id, v->name, i),
+					map_info->coord_var_ndims, map_info->coord_var_name );
+				break;
+				}
 			}
+		/* Now, since we've found the index of the lat dim, the
+		 * index of the lon dim must be the other one
+		 */
+		for( i=0; i<v->n_dims; i++ ) 
+			if( (map_info->matching_var_dims[i] == 1) && (i != idx_lat_dim))
+				idx_lon_dim = i;
+		}
+	else
+		{
+		fprintf( stderr, "(Location C)Error, did not correctly match mapped dims specified in the coordinates attribute to dims in the variable\n" );
+		fprintf( stderr, "(Location C)Please send email to dpierce at ucsd.edu letting me know what your coordinates attribute looks like so I can fix this problem.\n" );
+		exit( -1 );
+		}
 
-		s = strtok( NULL, delim );
+	/* Read in data from var, store it in cache */
+	totsize = 1L;
+	for( i=0; i<map_info->coord_var_ndims; i++ ) {
+		totsize *= map_info->coord_var_size[i];
+		start[i] = 0L;
+		count[i] = map_info->coord_var_size[i];
+		}
+	map_info->data_cache = (float *)malloc( totsize*sizeof(float) );
+	if( map_info->data_cache == NULL ) {
+		fprintf( stderr, "Error, could not allocate cache for dim map variable %s; total size (bytes): %ld\n", 
+			map_info->coord_var_name, totsize*sizeof(float) );
+		exit(-1);
+		}
+	netcdf_fi_get_data( ncid, map_info->coord_var_name, start, count, map_info->data_cache, NULL );
+
+	if( n_matches == 1 ) {
+		if( idx_lon_dim == -1 )
+			map_info->index_place_factor[idx_lat_dim] = 1L;
+		else
+			map_info->index_place_factor[idx_lon_dim] = 1L;
+		}
+	else if( n_matches == 2 ) {
+		map_info->index_place_factor[idx_lon_dim] = 1L;
+		map_info->index_place_factor[idx_lat_dim] = v->size[ idx_lon_dim ];
+		}
+	else
+		{
+		fprintf( stderr, "(Location D)Error, did not correctly match mapped dims specified in the coordinates attribute to dims in the variable\n" );
+		fprintf( stderr, "(Location D)Please send email to dpierce at ucsd.edu letting me know what your coordinates attribute looks like so I can fix this problem.\n" );
+		exit( -1 );
 		}
 
+	/*
+	printf( "matching var dims: " );
+	for( i=0; i<v->n_dims; i++ )
+		printf( "%d ", map_info->matching_var_dims[i] );
+	printf( "Index place factor: " );
+	for( i=0; i<v->n_dims; i++ )
+		printf( "%ld ", map_info->index_place_factor[i] );
+	printf( "\n" );
+	*/
 }
 
 /******************************************************************************
@@ -1263,6 +1342,7 @@ fill_dim_structs( NCVar *v )
 	 */
 	if( v->is_virtual && (*(v->dim) != NULL) && (v->first_file->next != NULL) ) {
 		/* The timelike dimension MUST be the first one! */
+		d = *(v->dim+0);
 		if( d->timelike ) {
 			/* Go through each file and see if it has the same units
 			 * as the first file, which is stored in d->units 
@@ -1443,7 +1523,7 @@ calc_dim_minmaxes( void )
 {
 	int	i, j;
 	NCVar	*v;
-	NCDim	*d, *tmpd;
+	NCDim	*d;
 	char	temp_str[1024];
 	nc_type	type;
 	double	temp_double, bounds_max, bounds_min;
@@ -1577,124 +1657,369 @@ contract_data( float *small_data, View *v, float fill_value )
  * NOTE this routine is only called when options.blowup > 0!
  */
 	void
-expand_data( float *big_data, View *v )
+expand_data( float *big_data, View *v, size_t array_size )
 {
-	size_t	to_width, x_size, y_size;
-	long	line, i, j, i2, j2;
-	int	blowup, blowupsq;
-	float	step;
+	size_t	idx, nxl, nyl, nxb, nyb;
+	long	line, il, jl, i2b, j2b;
+	int	blowup, offset_xb, offset_yb, miss_base, miss_right, miss_below;
+	float	step, final_est, extrap_fact;
 	float	base_val, right_val, below_val, val, bupr;
 	float	base_x, base_y, del_x, del_y;
 	float	est1, est2, frac_x, frac_y;
-	float 	fill_val;
+	float 	fill_val, cval;
+
+	blowup   = options.blowup;
+
+#ifdef CHECK_MEM
+	printf( "...CHECK_MEM is on!!\n" );
+#endif
+
+	/*--------------------------------------------------------------------------------
+	 * See my notebook entry of 2010-08-23. 
+	 * In general we draw a distinction between indices that are valid in the
+	 * original (little) array, indicazted by a "l" (little) suffix (such as il or jl),
+	 * and indices valid in the destination (big) array, which have a suffix of "b".
+	 *---------------------------------------------------------------------------------*/
+	nxl = *(v->variable->size + v->x_axis_id);	/* # of X entries in the little array */
+	nyl = *(v->variable->size + v->y_axis_id);	/* # of Y entries in the little array */
+	nxb = nxl*blowup;				/* # of X entries in big array */
+	nyb = nyl*blowup;				/* # of Y entries in big array */
 
 	fill_val = v->variable->fill_value;
-	x_size   = *(v->variable->size + v->x_axis_id);
-	y_size   = *(v->variable->size + v->y_axis_id);
 	
-	blowup   = options.blowup;
-	blowupsq = blowup * blowup;
-	to_width = blowup * x_size;
-	if( (blowupsq < blowup) || (to_width < blowup) ) {
+	if( (nxb < blowup) || (nxb*nyb < blowup) ) {
 		fprintf( stderr, "ncview: data_to_pixels: too much magnification\n" );
-		fprintf( stderr, "blowup=%d  blowupsq=%d  to_width=%ld\n",
-				blowup, blowupsq, to_width );
+		fprintf( stderr, "nxb=%ld\n", nxb );
 		exit( -1 );
 		}
 
-	if( options.blowup_type == BLOWUP_REPLICATE ) { 
-		for( j=0; j<y_size; j++ ) {
-			for( i=0; i<x_size; i++ )
-				for( i2=0; i2<blowup; i2++ )
-					*(big_data + i*blowup + j*to_width*blowup + i2) = *((float *)((float *)v->data)+i+j*x_size);
+	if( (blowup == 1) || (options.blowup_type == BLOWUP_REPLICATE)) { 
+		for( jl=0; jl<nyl; jl++ ) {
+			for( il=0; il<nxl; il++ )
+				for( i2b=0; i2b<blowup; i2b++ ) {
+#ifdef CHECK_MEM
+					if( il*blowup + jl*nxb*blowup + i2b >= array_size ) { fprintf( stderr, "mem error 001\n" ); exit(-1); }
+#endif
+					*(big_data + il*blowup + jl*nxb*blowup + i2b) = *((float *)((float *)v->data)+il+jl*nxl);
+					}
 			for( line=1; line<blowup; line++ )
-				for( i2=0; i2<to_width; i2++ )
-					*(big_data + i2 + j*to_width*blowup + line*to_width) =
-						*(big_data + i2 + j*to_width*blowup);
+				for( i2b=0; i2b<nxb; i2b++ ) {
+#ifdef CHECK_MEM
+					if( i2b + jl*nxb*blowup + line*nxb >= array_size ) { fprintf( stderr, "mem error 002\n" ); exit(-1); }
+#endif
+					*(big_data + i2b + jl*nxb*blowup + line*nxb) =
+						*(big_data + i2b + jl*nxb*blowup);
+					}
 			}
 		} 
+
 	else 	{ /* BLOWUP_BILINEAR */
 		bupr = 1.0/(float)blowup;
 
-		/* Horizontal base lines */
-		for( j=0; j<y_size; j++ )
-		for( i=0; i<x_size-1; i++ ) {
-			base_val  = *((float *)v->data + i   + j*x_size);
-			right_val = *((float *)v->data + i+1 + j*x_size);
+		/* Offset where we will put the center value into the big array. These are offsets
+		 * into the big array.
+		 */
+		offset_xb = (blowup - 1)/2;
+		offset_yb = offset_xb;
 
-			if( close_enough(base_val,  fill_val) || 
-			    close_enough(right_val, fill_val))
-				step = 0.0;
-			else
-				step = (right_val-base_val)*bupr;
-			val = base_val;
+		/* Horizontal base lines */
+		for( jl=0; jl<nyl; jl++ ) {
+			for( il=0; il<nxl-1; il++ ) {
+				base_val  = *((float *)v->data + il   + jl*nxl);
+				right_val = *((float *)v->data + il+1 + jl*nxl);
+
+				miss_base  = close_enough(base_val,  fill_val);
+				miss_right = close_enough(right_val, fill_val);
+				if( miss_base ) {
+					if( miss_right ) {
+						/* BOTH missing */
+						step = 0.0;
+						val = base_val;		/* missing value */
+						}
+					else
+						{
+						/* base missing, but right is there */
+						step = 0.0;
+						val = right_val;	/* an OK value */
+						}
+					}
+				else if( miss_right ) {
+					/* ONLY right is missing, checked for both missing above */
+					val = base_val;
+					step = 0.0;
+					}
+				else
+					{
+					/* NEITHER missing */
+					step = (right_val-base_val)*bupr;
+					val = base_val;
+					}
 
-			for( i2=0; i2 < blowup; i2++ ) {
-				*(big_data + i*blowup+i2 + j*x_size*blowupsq ) = val;
-				val += step;
+				for( i2b=0; i2b < blowup; i2b++ ) {
+#ifdef CHECK_MEM
+					if( il*blowup+i2b+offset_xb + jl*blowup*nxb + offset_yb*nxb >= array_size ) { fprintf( stderr, "mem error 003\n" ); exit(-1); }
+#endif
+					*(big_data + il*blowup+i2b+offset_xb + jl*blowup*nxb + offset_yb*nxb ) = val;
+					val += step;
+					}
 				}
+			/* Fill in the last center value on the right, which was left unfilled by the above alg */
+#ifdef CHECK_MEM
+			if( (nxl-1)*blowup+offset_xb + jl*blowup*nxb + offset_yb*nxb >= array_size ) { fprintf( stderr, "mem error 004\n" ); exit(-1); }
+#endif
+			*(big_data + (nxl-1)*blowup+offset_xb + jl*blowup*nxb + offset_yb*nxb ) = *((float *)v->data + (nxl-1) + jl*nxl);
 			}
 
 		/* Vertical base lines */
-		for( j=0; j<y_size-1; j++ )
-		for( i=0; i<x_size; i++ ) {
-			base_val  = *((float *)v->data + i   + j*x_size);
-			below_val = *((float *)v->data + i + (j+1)*x_size);
-			if( close_enough(base_val,  fill_val) || 
-			    close_enough(below_val, fill_val))
+		for( jl=0; jl<nyl-1; jl++ ) 
+		for( il=0; il<nxl;   il++ ) {
+			base_val  = *((float *)v->data + il + jl*nxl);
+			below_val = *((float *)v->data + il + (jl+1)*nxl);
+
+			miss_base  = close_enough(base_val,  fill_val);
+			miss_below = close_enough(below_val, fill_val);
+
+			if( miss_base ) {
+				if( miss_below ) {
+					/* BOTH missing */
+					step = 0.0;
+					val = base_val;		/* missing value */
+					}
+				else
+					{
+					/* base missing, but below is there */
+					step = 0.0;
+					val = below_val;	/* an OK value */
+					}
+				}
+			else if( miss_below ) {
+				/* ONLY below is missing, checked for both missing above */
+				val = base_val;
 				step = 0.0;
+				}
 			else
+				{
+				/* NEITHER missing */
 				step = (below_val-base_val)*bupr;
-			val = base_val;
+				val = base_val;
+				}
 
-			for( j2=0; j2 < blowup; j2++ ) {
-				*(big_data + i*blowup + j*to_width*blowup + j2*to_width ) = val;
+			for( j2b=0; j2b < blowup; j2b++ ) {
+#ifdef CHECK_MEM
+			if( il*blowup+offset_xb + jl*blowup*nxb + (j2b+offset_yb)*nxb >= array_size ) { fprintf( stderr, "mem error 005\n" ); exit(-1); }
+#endif
+				*(big_data + il*blowup+offset_xb + jl*blowup*nxb + (j2b+offset_yb)*nxb ) = val;
 				val += step;
 				}
 			}
-		/* Now, fill in the interior of the square by 
+		/* Fill in the last center value along the top, which was left unfilled by the above alg */
+		for( il=0; il<nxl; il++ ) {
+#ifdef CHECK_MEM
+			if( il*blowup+offset_xb + (nyl-1)*blowup*nxb + offset_yb*nxb >= array_size ) { fprintf( stderr, "mem error 006\n" ); exit(-1); }
+#endif
+			*(big_data + il*blowup+offset_xb + (nyl-1)*blowup*nxb + offset_yb*nxb) = *((float *)v->data + il + (nyl-1)*nxl);
+			}
+
+		/* Now, fill in the interior of the interior squares by 
 		 * interpolating from the horizontal and vertical
 		 * base lines.
 		 */
-		for( j=0; j<y_size-1; j++ )
-		for( i=0; i<x_size-1; i++ ) {
-			for( j2=1; j2<blowup; j2++ )
-			for( i2=1; i2<blowup; i2++ ) {
-				frac_x = (float)i2*bupr;
-				frac_y = (float)j2*bupr;
-				base_x = *(big_data + i*blowup + j*to_width*blowup+j2*to_width);
-				right_val = *(big_data + (i+1)*blowup + j*to_width*blowup+ j2*to_width);
-				base_y = *(big_data + i*blowup+i2 + j*to_width*blowup);
-				below_val = *(big_data + i*blowup+i2 + (j+1)*to_width*blowup);
+		for( jl=0; jl<nyl-1; jl++ )
+		for( il=0; il<nxl-1; il++ ) {
+			for( j2b=1; j2b<blowup; j2b++ )
+			for( i2b=1; i2b<blowup; i2b++ ) {
+				frac_x = (float)i2b*bupr;
+				frac_y = (float)j2b*bupr;
+
+				base_x    = *(big_data +  il   *blowup+offset_xb + jl*blowup*nxb +(j2b+offset_yb)*nxb);
+				right_val = *(big_data + (il+1)*blowup+offset_xb + jl*blowup*nxb+ (j2b+offset_yb)*nxb);
+				base_y    = *(big_data + il*blowup+i2b+offset_xb +  jl   *blowup*nxb + offset_yb*nxb);
+				below_val = *(big_data + il*blowup+i2b+offset_xb + (jl+1)*blowup*nxb + offset_yb*nxb);
 
 				if( close_enough(base_x,    fill_val) || 
 				    close_enough(right_val, fill_val) || 
-				    (i == x_size-1) )
+				    (il == nxl-1) )
 					del_x = 0.0;
 				else
 					del_x  = right_val - base_x;
 				if( close_enough(base_y,    fill_val) || 
 				    close_enough(below_val, fill_val) || 
-				    (j == y_size-1) )
+				    (jl == nyl-1) )
 					del_y = 0.0;
 				else
 					del_y  = below_val - base_y;
 				est1 = frac_x*del_x + base_x;
 				est2 = frac_y*del_y + base_y;
-				*(big_data + i*blowup+i2 + j*to_width*blowup + j2*to_width ) =
-					(est1 + est2)*.5;
+
+				if( close_enough( est1, fill_val )) {
+					if( close_enough( est2, fill_val ))
+						final_est = fill_val;
+					else
+						final_est = est2;
+					}
+				else if( close_enough( est2, fill_val ))
+					final_est = est1;
+				else
+					final_est = (est1 + est2)*.5;
+
+#ifdef CHECK_MEM
+				if( il*blowup+i2b+offset_xb + jl*blowup*nxb + (j2b+offset_yb)*nxb >= array_size ) { fprintf( stderr, "mem error 007\n" ); exit(-1); }
+#endif
+				*(big_data + il*blowup+i2b+offset_xb + jl*blowup*nxb + (j2b+offset_yb)*nxb ) = final_est;
+				}
+			}
+
+		/* It is a tricky and undetermined question as to whether we want to allow
+		 * extrema on the boundaries.  As a complete and total hack, we use only 
+		 * some fraction of the linear projection when extrapolating out to the 
+		 * edges.  If this is set to 1, then full linear extrapolation is used;
+		 * if set to 0, no extrapolation is done.
+		 */
+		extrap_fact = 0.2;
+
+		/* Fill in right hand side by extrapolating the gradient from the interior square fill.
+		 * This goes from y=the first center point to y=the last center point.
+		 */
+		il = nxl-1;
+		for( j2b=0; j2b<=blowup*(nyl-1); j2b++ ) {
+			idx = il*blowup+offset_xb + (j2b+offset_yb)*nxb;	
+			step = (*(big_data + idx - 1) - *(big_data + idx - 2));
+			val  = *(big_data + idx) + step;
+			for( i2b=1; i2b<(blowup-offset_xb+1); i2b++ ) {
+#ifdef CHECK_MEM
+				if( idx + i2b >= array_size ) { fprintf( stderr, "mem error 008\n" ); exit(-1); }
+#endif
+				*(big_data + idx + i2b) = val;
+				val += step*extrap_fact;
+				}
+			}
+
+		/* Fill in left hand side */
+		il = 0;
+		for( j2b=0; j2b<=blowup*(nyl-1); j2b++ ) {
+			idx = il*blowup+offset_xb + (j2b+offset_yb)*nxb;
+			step = (*(big_data + idx + 2) - *(big_data + idx + 1));
+			val  = *(big_data + idx) - step;
+			for( i2b=1; i2b<=(blowup-1)/2; i2b++ ) {
+#ifdef CHECK_MEM
+				if( idx - i2b >= array_size ) { fprintf( stderr, "mem error 009\n" ); exit(-1); }
+#endif
+				*(big_data + idx - i2b) = val;
+				val -= step*extrap_fact;
 				}
 			}
-		/* Fill in right hand side */
-		for( j=0; j<blowup*y_size; j++ )
-		for( i=0; i<blowup; i++ )
-			*(big_data + (x_size-1)*blowup+i + j*to_width ) = fill_val;
 
 		/* Fill in bottom */
-		for( j=0; j<blowup; j++ )
-		for( i=0; i<blowup*x_size; i++ )
-			*(big_data + i + (y_size-1)*to_width*blowup + j*to_width ) = fill_val;
-		}
+		jl = 0;
+		for( i2b=0; i2b<=blowup*(nxl-1); i2b++ ) {
+			idx = i2b+offset_xb + jl*blowup*nxb + offset_yb*nxb;
+			step = (*(big_data + idx + 2*nxb) - *(big_data + idx + nxb));   /* big(,y+2) - big(,y+1) */
+			val  = *(big_data + idx) - step;
+			for( j2b=1; j2b<=(blowup-1)/2; j2b++ ) {
+#ifdef CHECK_MEM
+				if( idx - j2b*nxb >= array_size ) { fprintf( stderr, "mem error 010\n" ); exit(-1); }
+#endif
+				*(big_data + idx - j2b*nxb) = val;
+				val -= step*extrap_fact;
+				}
+			}
+
+		/* Fill in top */
+		jl = nyl-1;
+		for( i2b=0; i2b<blowup*(nxl-1); i2b++ ) {
+			idx = i2b+offset_xb + jl*blowup*nxb + offset_yb*nxb;
+			step = (*(big_data + idx - nxb) - *(big_data + idx - 2*nxb));  /* big(,y-1) - big(,y-2) */
+			val  = *(big_data + idx) + step;
+			for( j2b=1; j2b<=blowup/2; j2b++ ) {
+#ifdef CHECK_MEM
+				if( idx + j2b*nxb >= array_size ) { fprintf( stderr, "mem error 011\n" ); exit(-1); }
+#endif
+				*(big_data + idx + j2b*nxb) = val;
+				val += step*extrap_fact;
+				}
+			}
+
+		/* Still have to fill in the four corners at this point.   Because of the
+		 * extrapolation issue noted above, we take a simple approach.  Just fill
+		 * in the corner blocks with the center data value.
+		 */
+
+		/* Lower left corner */
+		il = 0;
+		jl = 0;
+		cval = *((float *)v->data + il + jl*nxl);          /* Data value in lower left corner */
+		if( ! close_enough( cval, fill_val )) {
+			/* Fill in lower left corner */
+			for( j2b=0; j2b<=offset_yb; j2b++ )
+			for( i2b=0; i2b<=offset_xb; i2b++ ) {
+#ifdef CHECK_MEM
+				if( i2b + j2b*nxb >= array_size ) { fprintf( stderr, "mem error 012\n" ); exit(-1); }
+#endif
+				*(big_data + i2b + j2b*nxb) = cval;
+				}
+			}
+			
+		/* Lower right corner */
+		il = nxl - 1;
+		jl = 0;
+		cval = *((float *)v->data + il + jl*nxl);          /* Data value in lower left corner */
+		if( ! close_enough( cval, fill_val )) {
+			/* Fill in lower right corner */
+			for( j2b=0; j2b<=offset_yb; j2b++ )
+			for( i2b=offset_xb; i2b<blowup; i2b++ ) {
+#ifdef CHECK_MEM
+				if( il*blowup + i2b + j2b*nxb >= array_size ) { fprintf( stderr, "mem error 013\n" ); exit(-1); }
+#endif
+				*(big_data + il*blowup + i2b + j2b*nxb) = cval;
+				}
+			}
+
+		/* Upper right corner */
+		il = nxl - 1;
+		jl = nyl - 1;
+		cval = *((float *)v->data + il + jl*nxl);          /* Data value in lower left corner */
+		if( ! close_enough( cval, fill_val )) {
+			/* Fill in upper right corner */
+			for( j2b=offset_yb; j2b<blowup; j2b++ )
+			for( i2b=offset_xb; i2b<blowup; i2b++ ) {
+#ifdef CHECK_MEM
+				if( il*blowup + i2b + jl*blowup*nxb + j2b*nxb >= array_size ) { fprintf( stderr, "mem error 014\n" ); exit(-1); }
+#endif
+				*(big_data + il*blowup + i2b + jl*blowup*nxb + j2b*nxb) = cval;
+				}
+			}
+
+		/* Upper left corner */
+		il = 0;
+		jl = nyl - 1;
+		cval = *((float *)v->data + il + jl*nxl);          /* Data value in lower left corner */
+		if( ! close_enough( cval, fill_val )) {
+			/* Fill in upper left corner */
+			for( j2b=offset_yb; j2b<blowup; j2b++ )
+			for( i2b=0; i2b<=offset_xb; i2b++ ) {
+#ifdef CHECK_MEM
+				if(  il*blowup + i2b + jl*blowup*nxb + j2b*nxb >= array_size ) { fprintf( stderr, "mem error 015\n" ); exit(-1); }
+#endif
+				*(big_data + il*blowup + i2b + jl*blowup*nxb + j2b*nxb) = cval;
+				}
+			}
+
+		/* Paint missing value blocks */
+		for( jl=0; jl<nyl; jl++ )
+		for( il=0; il<nxl; il++ ) {
+			base_val  = *((float *)v->data + il   + jl*nxl);
+			if( close_enough( base_val, fill_val )) {
+				for( j2b=0; j2b<blowup; j2b++ )
+				for( i2b=0; i2b<blowup; i2b++ ) {
+#ifdef CHECK_MEM
+					if( il*blowup+i2b + jl*nxb*blowup + j2b*nxb >= array_size ) { fprintf( stderr, "mem error 016\n" ); exit(-1); }
+#endif
+					*(big_data + il*blowup+i2b + jl*nxb*blowup + j2b*nxb ) = base_val;
+					}
+				}
+			}
+
+		}	/* end of BLOWUP_BILINEAR case */
 }
 
 /******************************************************************************
diff --git a/src/util.o b/src/util.o
deleted file mode 100644
index da7ef62..0000000
Binary files a/src/util.o and /dev/null differ
diff --git a/src/util_2009-01-01.c b/src/util_2009-01-01.c
deleted file mode 100644
index 7a7bc31..0000000
--- a/src/util_2009-01-01.c
+++ /dev/null
@@ -1,1877 +0,0 @@
-/*
- * Ncview by David W. Pierce.  A visual netCDF file viewer.
- * Copyright (C) 1993 through 2010  David W. Pierce
- *
- * This program  is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 3 as 
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License, version 3, for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * David W. Pierce
- * 6259 Caminito Carrean
- * San Diego, CA   92122
- * pierce at cirrus.ucsd.edu
- */
-
-/*******************************************************************************
- * 	util.c
- *
- *	utility routines for ncview
- *
- *	should be independent of both the user interface and the data
- * 	file format.
- *******************************************************************************/
-
-#include "ncview.includes.h"
-#include "ncview.defines.h"
-#include "ncview.protos.h"
-
-#include "math.h"
-
-#ifdef INC_UDUNITS
-#include <udunits.h>
-#endif
-
-extern Options   options;
-extern NCVar     *variables;
-extern ncv_pixel *pixel_transform;
-extern FrameStore framestore;
-
-static void get_min_max_onestep( NCVar *var, size_t n_other, size_t tstep, float *data, 
-					float *min, float *max, int verbose );
-static void handle_time_dim( int fileid, NCVar *v, int dimid );
-static int  months_calc_tgran( int fileid, NCDim *d );
-static float util_mean( float *x, size_t n, float fill_value );
-static float util_mode( float *x, size_t n, float fill_value );
-static void contract_data( float *small_data, View *v, float fill_value );
-static int equivalent_FDBs( NCVar *v1, NCVar *v2 );
-static int data_has_mv( float *data, size_t n, float fill_value );
-static void handle_dim_mapping( NCVar *v );
-static void determine_lat_lon( char *s_in, int *is_lat, int *is_lon );
-
-/* Variables local to routines in this file */
-static  char    *month_name[12] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun",
-	"Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
-
-/*******************************************************************************
- * Determine whether the data is "close enough" to the fill value
- */
-int
-close_enough( float data, float fill )
-{
-	float	criterion, diff;
-	int	retval;
-
-	if( fill == 0.0 )
-		criterion = 1.0e-5;
-	else if( fill < 0.0 )
-		criterion = -1.0e-5*fill;
-	else
-		criterion = 1.0e-5*fill;
-
-	diff = data - fill;
-	if( diff < 0.0 ) 
-		diff = -diff;
-
-	if( diff <= criterion )
-		retval = 1;
-	else
-		retval = 0;
-
- /* printf( "d=%f f=%f c=%f r=%d\n", data, fill, criterion, retval );  */
-	return( retval );
-}
-
-/*******************************************************************************
- * Adds the given string to the list, and returns a pointer to the 
- * new list element.
- */
-	Stringlist *
-add_to_stringlist( Stringlist **list, char *new_string, void *aux )
-{
-	Stringlist 	*cursor, *new_el;
-	int		i;
-
-	new_stringlist( &new_el );
-	new_el->string = (char *)malloc( strlen( new_string )+1);
-	if( new_el == NULL ) {
-		fprintf( stderr, "ncview: add_to_stringlist: malloc failed\n" );
-		fprintf( stderr, "string trying to add: %s\n", new_string );
-		exit( -1 );
-		}
-	strcpy( new_el->string, new_string );
-	new_el->aux    = aux;
-
-	i = 0;
-	if( *list == NULL ) {
-		*list = new_el;
-		new_el->prev = NULL;
-		}
-	else
-		{
-		i = 1;
-		cursor = *list;
-		while( cursor->next != NULL ) {
-			cursor = cursor->next;
-			i++;
-			}
-		cursor->next = new_el;
-		new_el->prev = cursor;
-		}
-	new_el->index = i;
-
-	return( new_el );
-}
-
-/*******************************************************************************
- * Adds the given string to the list, and returns a pointer to the 
- * new list element, with alphabetic ordering.
- */
-	Stringlist *
-add_to_stringlist_ordered( Stringlist **list, char *new_string, void *aux )
-{
-	Stringlist 	*cursor, *new_el, *prev_el;
-	int		i;
-
-	new_stringlist( &new_el );
-	new_el->string = (char *)malloc( strlen( new_string )+1);
-	if( new_el == NULL ) {
-		fprintf( stderr, "ncview: add_to_stringlist: malloc failed\n" );
-		fprintf( stderr, "string trying to add: %s\n", new_string );
-		exit( -1 );
-		}
-	strcpy( new_el->string, new_string );
-	new_el->aux    = aux;
-
-	i = 0;
-	if( *list == NULL ) {
-		*list = new_el;
-		new_el->prev = NULL;
-		}
-	else
-		{
-		i = 1;
-		cursor = *list;
-		prev_el = NULL;
-		while( (cursor != NULL) && (strcmp( new_string, cursor->string) > 0)) {
-			prev_el = cursor;
-			cursor  = cursor->next;
-			i++;
-			}
-		if( cursor == NULL ) {
-			prev_el->next = new_el;
-			new_el->prev  = prev_el;
-			}
-		else if( prev_el == NULL ) {
-			*list = new_el;
-			new_el->next = cursor;
-			cursor->prev = new_el;
-			}
-		else
-			{
-			new_el->next = cursor;
-			cursor->prev = new_el;
-			prev_el->next = new_el;
-			new_el->prev  = prev_el;
-			}
-		}
-	new_el->index = i;
-
-	return( new_el );
-}
-
-
-/*******************************************************************************
- * Concatenate onto a stringlist
- */
-	void
-sl_cat( Stringlist **dest, Stringlist **src )
-{
-	Stringlist *sl;
-
-	sl = *src;
-	while( sl != NULL ) {
-		add_to_stringlist( dest, sl->string, NULL );
-		sl = sl->next;
-		}
-}
-
-/*******************************************************************************
- * Allocate space for a new Stringlist element 
- */
-	void
-new_stringlist( Stringlist **el )
-{
-	(*el)       = (Stringlist *)malloc( sizeof( Stringlist ));
-	(*el)->next = NULL;
-}
-
-/******************************************************************************
- * Add the passed NCVar element to the list 
- */
-	void
-add_to_varlist( NCVar **list, NCVar *new_el )
-{
-	int	i;
-	NCVar	*cursor;
-
-	i = 0;
-	if( *list == NULL ) {
-		*list = new_el;
-		new_el->prev = NULL;
-		}
-	else
-		{
-		i = 1;
-		cursor = *list;
-		while( cursor->next != NULL ) {
-			cursor = cursor->next;
-			i++;
-			}
-		cursor->next = new_el;
-		new_el->prev = cursor;
-		}
-}
-
-/******************************************************************************
- * Allocate space for a new NCVar element
- */
-	void
-new_variable( NCVar **el )
-{
-	(*el)       = (NCVar *)malloc( sizeof( NCVar ));
-	(*el)->next = NULL;
-}
-
-
-/******************************************************************************
- * Allocate space for a new FDBlist element
- */
-	void
-new_fdblist( FDBlist **el )
-{
-	NetCDFOptions	*new_netcdf_options;
-
-	(*el)           = (FDBlist *)malloc( sizeof( FDBlist ));
-	(*el)->next     = NULL;
-	(*el)->filename     = (char *)malloc( MAX_FILE_NAME_LEN );
-	(*el)->recdim_units = (char *)malloc( MAX_RECDIM_UNITS_LEN );
-
-#ifdef INC_UDUNITS
-	(*el)->udunits	    = (utUnit *)malloc( sizeof(utUnit) );
-#endif
-
-	strcpy( (*el)->filename, "UNINITIALIZED" );
-
-	new_netcdf( &new_netcdf_options );
-	(*el)->aux_data = new_netcdf_options;
-}
-
-/******************************************************************************
- * Allocate space for a NetCDFOptions structure.
- */
-	void
-new_netcdf( NetCDFOptions **n )
-{
-	(*n) = (NetCDFOptions *)malloc( sizeof( NetCDFOptions ));
-	(*n)->valid_range_set  = FALSE;
-	(*n)->valid_min_set    = FALSE;
-	(*n)->valid_max_set    = FALSE;
-	(*n)->scale_factor_set = FALSE;
-	(*n)->add_offset_set   = FALSE;
-
-	(*n)->valid_range[0] = 0.0;
-	(*n)->valid_range[1] = 0.0;
-	(*n)->valid_min      = 0.0;
-	(*n)->valid_max      = 0.0;
-	(*n)->scale_factor   = 1.0;
-	(*n)->add_offset     = 0.0;
-}
-
-/******************************************************************************
- * What's in this stringlist, anyway?
- */
-	void
-dump_stringlist( Stringlist *s )
-{
-	while( s != NULL ) {
-		printf( "%d: %s\n", s->index, s->string );
-		s = s->next;
-		}
-}
-
-/******************************************************************************
- * Return 1 if any data value is missing, 0 otherwise
- */
-	int
-data_has_mv( float *data, size_t n, float fill_value )
-{
-	size_t i;
-
-	for( i=0; i<n; i++ )
-		if( close_enough( data[i], fill_value ))
-			return(1);
-
-	return(0);
-}
-
-/******************************************************************************
- * Scale the data, replicate it, and convert to a pixel type array.  I'm afraid
- * that for speed, this considers 'ncv_pixel' to be a single byte value.  Make sure
- * to change it if you change the definition of ncv_pixel!  Returns 0 on
- * success, -1 on failure.
- */
-	int
-data_to_pixels( View *v )
-{
-	long	i, j, j2;
-	size_t	x_size, y_size, new_x_size, new_y_size;
-	ncv_pixel pix_val;
-	float	data_range, rawdata, data, fill_value, *scaled_data;
-	long	blowup, result, orig_minmax_method;
-	char	error_message[1024];
-
-	/* Make sure the limits have been set on this variable.
-	 * They won't always be because an initial expose event can 
-	 * cause this routine to be executed before the min and
-	 * maxes are calcuclated.
-	 */
-	if( ! v->variable->have_set_range )
-		return( -1 );
-
-	blowup   = options.blowup;	/* NOTE: can be negative if shrinking data! -N means size is 1/Nth */
-
-	x_size     = *(v->variable->size + v->x_axis_id);
-	y_size     = *(v->variable->size + v->y_axis_id);
-
-	view_get_scaled_size( options.blowup, x_size, y_size, &new_x_size, &new_y_size );
-
-	scaled_data   = (float *)malloc( new_x_size*new_y_size*sizeof(float));
-	if( scaled_data == NULL ) {
-		fprintf( stderr, "ncview: data_to_pixels: can't allocate data expansion array\n" );
-		fprintf( stderr, "requested size: %ld bytes\n", new_x_size*new_y_size*sizeof(float) );
-		fprintf( stderr, "new_x_size, new_y_size, float_size: %ld %ld %ld\n", 
-				new_x_size, new_y_size, sizeof(float) );
-		fprintf( stderr, "blowup: %d\n", options.blowup );
-		exit( -1 );
-		}
-
-	/* If we are doing overlays, implement them */
-	if( options.overlay->doit && (options.overlay->overlay != NULL)) {
-		for( i=0; i<(x_size*y_size); i++ ) {
-			*((float *)v->data + i) = 
-			     (float)(1 - *(options.overlay->overlay+i)) * *((float *)v->data + i) +
-			     (float)(*(options.overlay->overlay+i)) * v->variable->fill_value;
-			}
-		}
-
-	fill_value = v->variable->fill_value;
-
-	if( blowup > 0 )
-		expand_data( scaled_data, v );
-	else
-		contract_data( scaled_data, v, fill_value );
-
-	data_range = v->variable->user_max - v->variable->user_min;
-
-	if( (v->variable->user_max == 0) &&
-	    (v->variable->user_min == 0) ) {
-		in_set_cursor_normal();
-		in_button_pressed( BUTTON_PAUSE, MOD_1 );
-		if( options.min_max_method == MIN_MAX_METHOD_EXHAUST ) {
-	    		sprintf( error_message, "min and max both 0 for variable %s.\n(Checked all data)", 
-								v->variable->name );
-			in_error( error_message );
-			if( ! data_has_mv( v->data, x_size*y_size, fill_value ) )
-				return( -1 );
-			v->variable->user_max = 1;
-			}
-	    	sprintf( error_message, "min and max both 0 for variable %s.\nI can check ALL the data instead of subsampling if that's OK,\nor just cancel viewing this variable.",
-	    				v->variable->name );
-		result = in_dialog( error_message, NULL, TRUE );
-		if( result == MESSAGE_OK ) {
-			orig_minmax_method = options.min_max_method;
-			options.min_max_method = MIN_MAX_METHOD_EXHAUST;
-			init_min_max( v->variable );
-			options.min_max_method = orig_minmax_method;
-			if( (v->variable->user_max == 0) &&
-	    		    (v->variable->user_min == 0) ) {
-	    			sprintf( error_message, "min and max both 0 for variable %s.\n(Checked all data)", 
-								v->variable->name );
-				in_error( error_message );
-				if( ! data_has_mv( v->data, x_size*y_size, fill_value ) )
-					return( -1 );
-				v->variable->user_max = 1;
-				}
-			else
-				return( data_to_pixels(v) );
-			}
-		else
-			{
-			if( ! data_has_mv( v->data, x_size*y_size, fill_value ) )
-				return( -1 );
-			v->variable->user_max = 1;
-			}
-	    	}
-
-	if( v->variable->user_max == v->variable->user_min ) {
-		in_set_cursor_normal();
-	    	sprintf( error_message, "min and max both %g for variable %s",
-	    		v->variable->user_min, v->variable->name );
-		x_error( error_message );
-		if( ! data_has_mv( v->data, x_size*y_size, fill_value ) )
-			return( -1 );
-		/* If we get here, data is all same, but have a missing value,
-		 * so let's go ahead and show it
-		 */
-		if( v->variable->user_max == 0 )
-			v->variable->user_max = 1;
-		else if( v->variable->user_max > 0 )
-			v->variable->user_min = 0;
-		else
-			v->variable->user_max = 0;
-	    	}
-
-	for( j=0; j<new_y_size; j++ ) {
-
-		if( options.invert_physical )
-			j2 = j;
-		else
-			j2 = new_y_size - j - 1;
-
-		for( i=0; i<new_x_size; i++ ) {
-			rawdata =  *(scaled_data + i + j2*new_x_size);
-			if( close_enough(rawdata, fill_value) || (rawdata == FILL_FLOAT))
-				pix_val = *pixel_transform;
-			else
-				{
-				data = (rawdata - v->variable->user_min) / data_range;
-				clip_f( &data, 0.0, .9999 );
-				switch( options.transform ) {
-					case TRANSFORM_NONE:	break;
-
-					/* This might cause problems.  It is at odds with what
-					 * the manual claims--at least for Ultrix--but works, 
-					 * whereas what the manual claims works, doesn't!
-					 */
-					case TRANSFORM_LOW:	data = sqrt( data );  
-								data = sqrt( data );
-								break;
-
-					case TRANSFORM_HI:	data = data*data*data*data;     break;
-					}		
-				if( options.invert_colors )
-					data = 1. - data;
-				pix_val = (ncv_pixel)(data * options.n_colors) + 10;
-				if( options.display_type == PseudoColor )
-					pix_val = *(pixel_transform+pix_val);
-				}
-			*(v->pixels + i + j*new_x_size) = pix_val;
-			}
-		}
-	free( scaled_data );
-	return( 0 );
-}
-
-/******************************************************************************
- * Returns the number of entries in the NCVarlist
- */
-	int
-n_vars_in_list( NCVar *v )
-{
-	NCVar *cursor;
-	int   i;
-
-	i      = 0;
-	cursor = v;
-	while( cursor != NULL ) {
-		i++;
-		cursor = cursor->next;
-		}
-
-	return( i );
-}
-
-/******************************************************************************
- * Returns the number of entries in the Stringlist
- */
-	int
-n_strings_in_list( Stringlist *s )
-{
-	Stringlist *c;
-	int	   i;
-
-	i = 0;
-	c = s;
-	while( c != NULL ) {
-		i++;
-		c = c->next;
-		}
-
-	return( i );
-}
-	
-/******************************************************************************
- * Given a list of variable *names*, initialize the variable *structure* and
- * add it to the global list of variables.  Input arg 'nfiles' is the total
- * number of files indicated on the command line, this can be useful for 
- * initializing arrays.
- */
-	void
-add_vars_to_list( Stringlist *var_list, int id, char *filename, int nfiles )
-{
-	Stringlist *var;
-
-	if( options.debug )
-		fprintf( stderr, "adding vars to list for file %s\n", filename );
-	var = var_list;
-	while( var != NULL ) {
-		if( options.debug ) 
-			fprintf( stderr, "adding variable %s to list\n", var->string );
-		add_var_to_list( var->string, id, filename, nfiles );
-		var = var->next;
-		}
-	if( options.debug ) 
-		fprintf( stderr, "done adding vars for file %s\n", filename );
-}
-
-/******************************************************************************
- * For the given variable name, fill out the variable and file structures,
- * and add them into the global variable list.
- */
-	void
-add_var_to_list( char *var_name, int file_id, char *filename, int nfiles )
-{
-	NCVar	*var, *new_var;
-	int	n_dims, err;
-	FDBlist	*new_fdb, *fdb;
-
-	/* make a new file description entry for this var/file combo */
-	new_fdblist( &new_fdb );
-	new_fdb->id       = file_id;
-	new_fdb->var_size = fi_var_size( file_id, var_name );
-	if( strlen(filename) > (MAX_FILE_NAME_LEN-1)) {
-		fprintf( stderr, "Error, input file name is too long; longest I can handle is %d\nError occurred on file %s\n",
-			MAX_FILE_NAME_LEN, filename );
-		exit(-1);
-		}
-	strcpy( new_fdb->filename, filename );
-
-	/* fill out auxilliary (data-file format dependent) information
-	 * for the new fdb.
-	 */
-	fi_fill_aux_data( file_id, var_name, new_fdb );
-#ifdef INC_UDUNITS
-	err = utScan( new_fdb->recdim_units, new_fdb->udunits );
-	if( err != 0 )
-		new_fdb->udunits = NULL;
-#endif
-
-	/* Does this variable already have an entry on the global var list "variables"? */
-	var = get_var( var_name );
-	if( var == NULL ) {	/* NO -- make a new NCVar structure */
-		new_variable( &new_var );
-		new_var->name       = (char *)malloc( strlen(var_name)+1 );
-		strcpy( new_var->name, var_name );
-		n_dims              = fi_n_dims( file_id, var_name );
-		new_var->n_dims     = n_dims;
-		if( options.debug )
-			fprintf( stderr, "adding variable %s with %d dimensions\n",
-				var_name, n_dims );
-		new_var->first_file = new_fdb;
-		new_var->last_file  = new_fdb;
-		new_var->global_min = 0.0;
-		new_var->global_max = 0.0;
-		new_var->user_min   = 0.0;
-		new_var->user_max   = 0.0;
-		new_var->have_set_range = FALSE;
-		new_var->size       = fi_var_size( file_id, var_name );
-		new_var->fill_value = DEFAULT_FILL_VALUE;
-		fi_fill_value( new_var, &(new_var->fill_value) );
-		new_fdb->prev       = NULL;
-		handle_dim_mapping( new_var );	/* needs to be before fill_dim_structs cuz latter access fi_dim_info */
-		fill_dim_structs( new_var );
-		add_to_varlist  ( &variables, new_var );
-		new_var->is_virtual = FALSE;
-		}
-	else	/* YES -- just add the FDB to the list of files in which 
-		 * this variable appears, and accumulate the variable's size.
-		 */
-		{
-		/* Go to the end of the file list and add it there */
-		if( options.debug )
-			fprintf( stderr, "adding another file with variable %s in it\n",
-				var_name );
-		if( var->last_file == NULL ) {
-			fprintf( stderr, "ncview: add_var_to_list: internal ");
-			fprintf( stderr, "inconsistancy; var has no last_file\n" );
-			exit( -1 );
-			}
-		fdb = var->first_file;
-		while( fdb->next != NULL )
-			fdb = fdb->next;
-		fdb->next         = new_fdb;
-		new_fdb->prev     = fdb;
-		var->last_file    = new_fdb;
-		*(var->size)      += *(new_fdb->var_size);
-		var->is_virtual   = TRUE;
-		}
-}
-
-/******************************************************************************
- * Calculate the min and max values for the passed variable.
- */
-	void
-init_min_max( NCVar *var )
-{
-	long	n_other, i, step;
-	size_t	n_timesteps;
-	float	*data, init_min, init_max;
-	int	verbose;
-
-	init_min =  9.9e30;
-	init_max = -9.9e30;
-	var->global_min = init_min;
-	var->global_max = init_max;
-
-	printf( "calculating min and maxes for %s", var->name );
-
-	/* n_other is the number of elements in a single timeslice of the data array */
-	n_timesteps = *(var->size);
-	n_other     = 1L;
-	for( i=1; i<var->n_dims; i++ )
-		n_other *= *(var->size+i);
-
-	data = (float *)malloc( n_other * sizeof( float ));
-	if( data == NULL ) {
-		fprintf( stderr, "ncview: init_min_max_file: failed on malloc of data array\n" );
-		exit( -1 );
-		}
-
-	/* We always get the min and max of the first, middle, and last time 
-	 * entries if they are distinct.
-	 */
-	verbose = TRUE;
-	step    = 0L;
-	get_min_max_onestep( var, n_other, step, data, 
-			&(var->global_min), &(var->global_max), verbose );
-	if( n_timesteps == 1 ) {
-		if( verbose )
-			printf( "\n" );
-		free( data );
-		check_ranges( var );
-		return;
-		}
-
-	step = n_timesteps-1L;
-	get_min_max_onestep( var, n_other, step, data, 
-			&(var->global_min), &(var->global_max), verbose );
-	if( n_timesteps == 2 ) {
-		if( verbose )
-			printf( "\n" );
-		free( data );
-		check_ranges( var );
-		return;
-		}
-
-	step = (n_timesteps-1L)/2L;
-	get_min_max_onestep( var, n_other, step, data, 
-			&(var->global_min), &(var->global_max), verbose );
-	if( n_timesteps == 3 ) {
-		if( verbose )
-			printf( "\n" );
-		free( data );
-		check_ranges( var );
-		return;
-		}
-
-	switch( options.min_max_method ) {
-		case MIN_MAX_METHOD_FAST: 
-			if( verbose )
-				printf( "\n" );
-			break;
-			
-		case MIN_MAX_METHOD_MED:     
-			verbose = TRUE;
-			step = (n_timesteps-1L)/4L;
-			get_min_max_onestep( var, n_other, step, data, 
-				&(var->global_min), &(var->global_max), verbose );
-			step = (3L*(n_timesteps-1L))/4L;
-			get_min_max_onestep( var, n_other, step, data, 
-				&(var->global_min), &(var->global_max), verbose );
-			if( verbose )
-				printf( "\n" );
-			break;
-				
-		case MIN_MAX_METHOD_SLOW:
-			verbose = TRUE;
-			for( i=2; i<=9; i++ ) { 
-				printf( "." );
-				step = (i*(n_timesteps-1L))/10L;
-				get_min_max_onestep( var, n_other, step, data, 
-					&(var->global_min), &(var->global_max), verbose );
-				}
-			if( verbose )
-				printf( "\n" );
-			break;
-			
-		case MIN_MAX_METHOD_EXHAUST:
-			verbose = TRUE;
-			for( i=1; i<(n_timesteps-2L); i++ ) {
-				step = i;
-				get_min_max_onestep( var, n_other, step, data, 
-					&(var->global_min), &(var->global_max), verbose );
-				}
-			if( verbose )
-				printf( "\n" );
-			break;
-		}
-
-	if( (var->global_min == init_min) && (var->global_max == init_max) ) {
-		var->global_min = 0.0;
-		var->global_max = 0.0;
-		}
-		
-	check_ranges( var );
-	free( data );
-}
-
-/******************************************************************************
- * Try to reconcile the computed and specified (if any) data range
- */
-	void
-check_ranges( NCVar *var )
-{
-	float	min, max;
-	int	message;
-	char	temp_string[ 1024 ];
-
-	if( netcdf_min_max_option_set( var, &min, &max ) ) {
-		if( var->global_min < min ) {
-			sprintf( temp_string, "Calculated minimum (%g) is less than\nvalid_range minimum (%g).  Reset\nminimum to valid_range minimum?", var->global_min, min );
-			message = in_dialog( temp_string, NULL, TRUE );
-			if( message == MESSAGE_OK )
-				var->global_min = min;
-			}
-		if( var->global_max > max ) {
-			sprintf( temp_string, "Calculated maximum (%g) is greater\nthan valid_range maximum (%g). Reset\nmaximum to valid_range maximum?", var->global_max, max );
-			message = in_dialog( temp_string, NULL, TRUE );
-			if( message == MESSAGE_OK )
-				var->global_max = max;
-			}
-		}
-
-	if( netcdf_min_option_set( var, &min ) ) {
-		if( var->global_min < min ) {
-			sprintf( temp_string, "Calculated minimum (%g) is less than\nvalid_min minimum (%g).  Reset\nminimum to valid_min value?", var->global_min, min );
-			message = in_dialog( temp_string, NULL, TRUE );
-			if( message == MESSAGE_OK )
-				var->global_min = min;
-			}
-		}
-
-	if( netcdf_max_option_set( var, &max ) ) {
-		if( var->global_max > max ) {
-			sprintf( temp_string, "Calculated maximum (%g) is greater than\nvalid_max maximum (%g).  Reset\nmaximum to valid_max value?", var->global_max, max );
-			message = in_dialog( temp_string, NULL, TRUE );
-			if( message == MESSAGE_OK )
-				var->global_max = max;
-			}
-		}
-
-	var->user_min = var->global_min;
-	var->user_max = var->global_max;
-	var->have_set_range = TRUE;
-}
-
-/******************************************************************************
- * get_min_max utility routine; is passed timestep number where want to 
- * determine extrema 
- */
-	static void
-get_min_max_onestep( NCVar *var, size_t n_other, size_t tstep, float *data, 
-					float *min, float *max, int verbose )
-{
-	size_t	*start, *count, n_time;
-	size_t	j;
-	int	i;
-	float	dat, fill_v;
-	
-	count  = (size_t *)malloc( var->n_dims * sizeof( size_t ));
-	start  = (size_t *)malloc( var->n_dims * sizeof( size_t ));
-	fill_v = var->fill_value;
-
-	n_time = *(var->size);
-	if( tstep > (n_time-1) )
-		tstep = n_time-1;
-
-	*(count) = 1L;
-	*(start) = tstep;
-	for( i=1; i<var->n_dims; i++ ) {
-		*(start+i) = 0L;
-		*(count+i) = *(var->size + i);
-		}
-
-	if( verbose ) {
-		printf( "." );
-		fflush( stdout );
-		}
-
-	fi_get_data( var, start, count, data );
-
-	for( j=0; j<n_other; j++ ) {
-		dat = *(data+j);
-		if( dat != dat )
-			dat = fill_v;
-		if( (! close_enough(dat, fill_v)) && (dat != FILL_FLOAT) )
-			{
-			if( dat > *max )
-				*max = dat;
-			if( dat < *min )
-				*min = dat;
-			}
-		}
-		
-	free( count );
-	free( start );
-}
-
-/******************************************************************************
- * convert a variable name to a NCVar structure
- */
-	NCVar *
-get_var( char *var_name )
-{
-	NCVar	*ret_val;
-
-	ret_val = variables;
-	while( ret_val != NULL )
-		if( strcmp( var_name, ret_val->name ) == 0 )
-			return( ret_val );
-		else
-			ret_val = ret_val->next;
-
-	return( NULL );
-}
-
-/******************************************************************************
- * Clip out of range floats 
- */
-	void
-clip_f( float *data, float min, float max )
-{
-	if( *data < min )
-		*data = min;
-	if( *data > max )
-		*data = max;
-}
-
-/******************************************************************************
- * Turn a virtual variable 'place' array into a file/place pair.  Which is
- * to say, the virtual size of a variable spans the entries in all the files; 
- * the actual place where the entry for a particular virtual location can
- * be found is in a file/actual_place pair.  This routine does the conversion.
- * Note that this routine is assuming the netCDF convention that ONLY THE
- * FIRST index can be contiguous across files.  The first index is typically
- * the time index in netCDF files.  NOTE! that 'act_pl' must be allocated 
- * before calling this!
- */
-	void
-virt_to_actual_place( NCVar *var, size_t *virt_pl, size_t *act_pl, FDBlist **file )
-{
-	FDBlist	*f;
-	size_t	v_place, cur_start, cur_end;
-	int	i, n_dims;
-
-	f       = var->first_file;
-	n_dims  = fi_n_dims( f->id, var->name );
-	v_place = *(virt_pl);
-
-	if( v_place >= *(var->size) ) {
-		fprintf( stderr, "ncview: virt_to_actual_place: error trying ");
-		fprintf( stderr, "to convert the following virtual place to\n" );
-		fprintf( stderr, "an actual place for variable %s:\n", var->name );
-		for( i=0; i<n_dims; i++ )
-			fprintf( stderr, "[%1d]: %ld\n", i, *(virt_pl+i) );
-		exit( -1 );
-		}
-
-	cur_start = 0L;
-	cur_end   = *(f->var_size) - 1L;
-	while( v_place > cur_end ) {
-		cur_start += *(f->var_size);
-		f          = f->next;
-		cur_end   += *(f->var_size);
-		}
-
-	*file = f;
-	*act_pl = v_place - cur_start;
-
-	/* Copy the rest of the indices over */
-	for( i=1; i<n_dims; i++ )
-		*(act_pl+i) = *(virt_pl+i);
-}
-
-/******************************************************************************
- * Initialize the var->dim_map_info table
- */
-	void
-handle_dim_mapping( NCVar *v )
-{
-	int	i, j, found_match, varid, ncid, must_be_left_of, n_matches,
-		is_lat, is_lon, idx_lat_dim, idx_lon_dim, 
-		coord_var_eff_size[MAX_NC_DIMS], coord_var_neff_dims;
-	char	*coord_att, *s;
-	NCDim_map_info	*map_info;
-	const 	char *delim = " \n\0\t";
-	size_t	totsize, start[MAX_NC_DIMS], count[MAX_NC_DIMS];
-
-	if( options.debug ) printf( "handle_dim_mapping: entering for var %s\n", v->name );
-
-	ncid = v->first_file->id;
-
-	v->dim_map_info = (NCDim_map_info **)malloc( sizeof(NCDim_map_info *) * v->n_dims );
-	for( i=0; i<v->n_dims; i++ )
-		(v->dim_map_info)[i] = (NCDim_map_info *)NULL;
-
-	/* See if this var has a "coordinates" attribute */
-	coord_att = netcdf_get_char_att( ncid, v->name, "coordinates" );
-	if( coord_att == NULL )
-		return;
-
-	if( options.debug ) printf( "var %s HAS a coordinates attribute: >%s<\n", v->name, coord_att );
-
-	/* Check for blank-delimited strings in the coordinates attribute
-	 * that name other vars in the file
-	 */
-	s = strtok( coord_att, delim );
-	while( s != NULL ) {
-
-		/* See if this is token, which came from the coordinates attribute,
-		 * is the name of a variable in the file 
-		 */
-		varid = safe_ncvarid( ncid, s );
-		if( varid != -1 ) {	/* yes, the token matches the name of a var in the file! */
-
-			/* Make new, uninitialized dim_map_info structure */
-			map_info = (NCDim_map_info *)malloc( sizeof(NCDim_map_info) );
-			map_info->coord_att = (char *)malloc( sizeof(char)*(strlen(coord_att)+2));
-			strcpy( map_info->coord_att, coord_att );
-
-			/* This is the "variable that I map" */
-			map_info->var_i_map = v;
-
-			map_info->coord_var_name = (char *)malloc( strlen(s) + 2 );
-			strcpy( map_info->coord_var_name, s );
-
-			if( options.debug ) printf( "Coord var name: >%s<\n", s );
-
-			/* See how many dims this coord var has */
-			map_info->coord_var_ndims = netcdf_n_dims( ncid, s );
-
-			/* Get size of the coord var */
-			map_info->coord_var_size = netcdf_fi_var_size( ncid, s );
-
-			if( options.debug ) {
-				printf( "Coord var has %d dims, here are their sizes: ",
-					map_info->coord_var_ndims );
-				for( i=0; i<map_info->coord_var_ndims; i++ )
-					printf( "%d ", map_info->coord_var_size[i] );
-				printf( "\n" );
-				}
-
-			/* Right now, I'm only going to try to handle 2-D mapping dims.
-			 * If the dim is more complicated than that, then we simply
-			 * ignore the mapping.  In particular, the test WRF output file
-			 * I have has a 3-D mapping dim with time as the first time.
-			 * Does WRF move the mapping around over time?  Dunno.  In
-			 * any event, we will allow it to handle 2 EFFECTIVE dims,
-			 * but otherwise, if the mapping var has more than 2 effective
-			 * dims, then forget it.
-			 */
-			coord_var_neff_dims = 0;
-			for( i=0; i<map_info->coord_var_ndims; i++ )
-				if( map_info->coord_var_size[i] > 1 ) {
-					coord_var_eff_size[coord_var_neff_dims] = map_info->coord_var_size[i];
-					coord_var_neff_dims++;
-					}
-
-			if( coord_var_neff_dims != 2 ) {
-				printf( "Note: the coordinates attribute for variable %s is being ignored,\n", v->name );
-				printf( "since it specifies a variable (%s) that has %d effective (size != 1) dims\n", 
-					map_info->coord_var_name, coord_var_neff_dims );
-				printf( "I am not set up to handle cases with coordinate mapping using anything other than 2 effective dims\n" );
-				return;
-				}
-
-			/* Get array of boolean indicating which dims in the 
-			 * base var match the shape of this coord var.  For
-			 * instance, if we have a var of shape (10,20,180,360)
-			 * and a coord var of shape (180,360) then this indicting
-			 * array will be 0,0,1,1.
-			 */
-			map_info->matching_var_dims  = (int *)   malloc( sizeof(int)    * v->n_dims );
-			map_info->index_place_factor = (size_t *)malloc( sizeof(size_t) * v->n_dims );
-			for( i=0; i<v->n_dims; i++ ) {
-				map_info->matching_var_dims [i] = 0;
-				map_info->index_place_factor[i] = 0;
-				}
-
-			must_be_left_of = v->n_dims;
-			for( i=map_info->coord_var_ndims-1; i>=0; i--)
-				for( j=must_be_left_of; j>=0; j-- ) {
-					if( coord_var_eff_size[i] == v->size[j] ) {
-						map_info->matching_var_dims[j] = 1;
-						must_be_left_of = j;
-						break;
-						}
-					}
-
-			n_matches = 0;
-			for( i=0; i<v->n_dims; i++ )
-				n_matches += map_info->matching_var_dims[i];
-			if( n_matches != coord_var_neff_dims ) {
-				fprintf( stderr, "(Location A)Error, did not correctly match mapped dims specified in the coordinates attribute to dims in the variable\n" );
-				fprintf( stderr, "(Location A)Please send email to dpierce at ucsd.edu letting me know what your coordinates attribute looks like so I can fix this problem.\n" );
-				exit( -1 );
-				}
-			if( (n_matches<1) || (n_matches>2)) {
-				fprintf( stderr, "(Location B) Error, did not correctly match mapped dims specified in the coordinates attribute to dims in the variable\n" );
-				fprintf( stderr, "(Location B) Please send email to dpierce at ucsd.edu letting me know what your coordinates attribute looks like so I can fix this problem.\n" );
-
-				}
-
-			/* Try to figure out if this dim is 'latitude' like
-			 * or 'longitude' like....these are the only options
-			 * for now. 
-			 */
-			determine_lat_lon( map_info->coord_var_name, &is_lat, &is_lon );
-			idx_lon_dim = -1;
-			idx_lat_dim = -1;
-			if( is_lon ) {
-				/* Match this coord var to the last one on the right */
-				for( i=v->n_dims-1; i>=0; i-- ) {
-					if( map_info->matching_var_dims[i] == 1 ) {
-						v->dim_map_info[i] = map_info;
-						idx_lon_dim = i;
-						if( options.debug )
-							printf( "In variable \"%s\", dimension \"%s\" is mapped by LONGITUDE-like %d-dimensional variable \"%s\"\n",
-							v->name, netcdf_dim_id_to_name( v->first_file->id, v->name, i), 
-							map_info->coord_var_ndims, map_info->coord_var_name );
-						break;
-						}
-					}
-				/* Now, since we've found the index of the lon dim, the
-				 * index of the lat dim must be the other one
-				 */
-				for( i=0; i<v->n_dims; i++ ) 
-					if( (map_info->matching_var_dims[i] == 1) && (i != idx_lon_dim))
-						idx_lat_dim = i;
-				}
-			else if( is_lat ) {
-				/* Match this coord var to the first one on the left */
-				for( i=0; i<v->n_dims; i++ ) {
-					if( map_info->matching_var_dims[i] == 1 ) {
-						idx_lat_dim = i;
-						v->dim_map_info[i] = map_info;
-						if( options.debug )
-							printf( "In variable \"%s\", dimension \"%s\" is mapped by LATITUDE-like dimension %d-dimensional variable \"%s\"\n",
-							v->name, netcdf_dim_id_to_name( v->first_file->id, v->name, i),
-							map_info->coord_var_ndims, map_info->coord_var_name );
-						break;
-						}
-					}
-				/* Now, since we've found the index of the lat dim, the
-				 * index of the lon dim must be the other one
-				 */
-				for( i=0; i<v->n_dims; i++ ) 
-					if( (map_info->matching_var_dims[i] == 1) && (i != idx_lat_dim))
-						idx_lon_dim = i;
-				}
-			else
-				{
-				fprintf( stderr, "(Location C)Error, did not correctly match mapped dims specified in the coordinates attribute to dims in the variable\n" );
-				fprintf( stderr, "(Location C)Please send email to dpierce at ucsd.edu letting me know what your coordinates attribute looks like so I can fix this problem.\n" );
-				exit( -1 );
-				}
-
-			/* Read in data from var, store it in cache */
-			totsize = 1L;
-			for( i=0; i<map_info->coord_var_ndims; i++ ) {
-				totsize *= map_info->coord_var_size[i];
-				start[i] = 0L;
-				count[i] = map_info->coord_var_size[i];
-				}
-			map_info->data_cache = (float *)malloc( totsize*sizeof(float) );
-			if( map_info->data_cache == NULL ) {
-				fprintf( stderr, "Error, could not allocate cache for dim map variable %s; total size (bytes): %ld\n", 
-					map_info->coord_var_name, totsize*sizeof(float) );
-				exit(-1);
-				}
-			netcdf_fi_get_data( ncid, map_info->coord_var_name, start, count, map_info->data_cache, NULL );
-
-			if( n_matches == 1 ) {
-				if( idx_lon_dim == -1 )
-					map_info->index_place_factor[idx_lat_dim] = 1L;
-				else
-					map_info->index_place_factor[idx_lon_dim] = 1L;
-				}
-			else if( n_matches == 2 ) {
-				map_info->index_place_factor[idx_lon_dim] = 1L;
-				map_info->index_place_factor[idx_lat_dim] = v->size[ idx_lon_dim ];
-				}
-			else
-				{
-				fprintf( stderr, "(Location D)Error, did not correctly match mapped dims specified in the coordinates attribute to dims in the variable\n" );
-				fprintf( stderr, "(Location D)Please send email to dpierce at ucsd.edu letting me know what your coordinates attribute looks like so I can fix this problem.\n" );
-				exit( -1 );
-				}
-
-			/*
-			printf( "matching var dims: " );
-			for( i=0; i<v->n_dims; i++ )
-				printf( "%d ", map_info->matching_var_dims[i] );
-			printf( "Index place factor: " );
-			for( i=0; i<v->n_dims; i++ )
-				printf( "%ld ", map_info->index_place_factor[i] );
-			printf( "\n" );
-			*/
-
-			}
-		else
-			printf( "NO, %s is NOT a var in the file\n", s );
-
-		s = strtok( NULL, delim );
-		}
-
-}
-
-/******************************************************************************
- * Initialize all the fields in the dim structure by reading from the data file
- */
-	void
-fill_dim_structs( NCVar *v )
-{
-	int	i, fileid;
-	NCDim	*d;
-	char	*dim_name, *tmp_units;
-	static  int global_id = 0;
-	FDBlist	*cursor;
-
-	fileid = v->first_file->id;
-	v->dim = (NCDim **)malloc( v->n_dims*sizeof( NCDim *));
-	for( i=0; i<v->n_dims; i++ ) {
-		if( is_scannable( v, i ) ) {
-			dim_name     	= fi_dim_id_to_name( fileid, v->name, i );
-			*(v->dim + i)	= (NCDim *)malloc( sizeof( NCDim ));
-			d            	= *(v->dim+i);
-			d->name      	= dim_name;
-			d->long_name 	= fi_dim_longname( fileid, dim_name );
-			d->have_calc_minmax = 0;
-			d->units     	= fi_dim_units   ( fileid, dim_name );
-			d->units_change = 0;
-			d->size      	= *(v->size+i);
-			d->calendar  	= fi_dim_calendar( fileid, dim_name );
-			d->global_id 	= ++global_id;
-			handle_time_dim( fileid, v, i );
-			if( options.debug ) 
-				fprintf( stderr, "adding scannable dim to var %s: dimname: %s dimsize: %ld\n", v->name, dim_name, d->size );
-			}
-		else
-			{
-			/* Indicate non-scannable dimensions by a NULL */
-			*(v->dim + i) = NULL;
-			if( options.debug ) 
-				fprintf( stderr, "adding non-scannable dim to var %s\n", v->name );
-			}
-		}
-
-	/* If this variable lives in more than one file, it might have 
-	 * different time units in each one.  Check for this.
-	 */
-	if( v->is_virtual && (*(v->dim) != NULL) && (v->first_file->next != NULL) ) {
-		/* The timelike dimension MUST be the first one! */
-		if( d->timelike ) {
-			/* Go through each file and see if it has the same units
-			 * as the first file, which is stored in d->units 
-			 */
-			cursor = v->first_file->next;
-			while( cursor != NULL ) {
-				tmp_units = fi_dim_units( cursor->id, d->name );
-				if( strcmp( d->units, tmp_units ) != 0 ) {
-					printf( "** Warning: different time units found in different files.  Trying to compensate...\n" );
-					d->units_change = 1;
-					}
-				}
-			}
-		}
-}
-
-/******************************************************************************
- * Is this variable a "scannable" variable -- i.e., accessable by the taperecorder
- * style buttons?
- */
-	int
-is_scannable( NCVar *v, int i )
-{
-	/* The unlimited record dimension is always scannable */
-	if( i == 0 )
-		return( TRUE );
-
-	if( *(v->size+i) > 1 )
-		return( TRUE );
-	else
-		return( FALSE );
-}
-
-/******************************************************************************
- * Return the mode (most common value) of passed array "x".  We assume "x"
- * contains the floating point representation of integers.
- */
-	float
-util_mode( float *x, size_t n, float fill_value )
-{
-	long 	i, n_vals;
-	double 	sum;
-	long 	ival, *count_vals, max_count, *unique_vals;
-	int	foundval, j, max_index;
-	float	retval;
-
-	count_vals  = (long *)malloc( n*sizeof(long) );
-	unique_vals = (long *)malloc( n*sizeof(long) );
-
-	sum = 0.0;
-	n_vals = 0;
-	for( i=0L; i<n; i++ ) {
-		if( close_enough( x[i], fill_value )) {
-			free(count_vals);
-			free(unique_vals);
-			return( fill_value );
-			}
-		ival = (x[i] > 0.) ? (long)(x[i]+.4) : (long)(x[i]-.4); /* round x[i] to nearest integer */
-		foundval = -1;
-		for( j=0; j<n_vals; j++ ) {
-			if( unique_vals[j] == ival ) {
-				foundval = j;
-				break;
-				}
-			}
-		if( foundval == -1 ) {
-			unique_vals[n_vals] = ival;
-			count_vals[n_vals] = 1;
-			n_vals++;
-			}
-		else
-			count_vals[foundval]++;
-		}
-
-	max_count = -1;
-	max_index = -1;
-	for( i=0L; i<n_vals; i++ )
-		if( count_vals[i] > max_count ) {
-			max_count = count_vals[i];
-			max_index = i;
-			}
-
-	retval = (float)unique_vals[max_index];
-
-	free(count_vals);
-	free(unique_vals);
-
-	return( retval );
-}
-
-/******************************************************************************/
-	float
-util_mean( float *x, size_t n, float fill_value )
-{
-	long i;
-	double sum;
-
-	sum = 0.0;
-	for( i=0L; i<n; i++ ) {
-		if( close_enough( x[i], fill_value ))
-			return( fill_value );
-		sum += x[i];
-		}
-
-	sum = sum / (double)n;
-	return( sum );
-}
-
-/******************************************************************************/
-	int
-equivalent_FDBs( NCVar *v1, NCVar *v2 )
-{
-	FDBlist *f1, *f2;
-
-	f1 = v1->first_file;
-	f2 = v2->first_file;
-	while( f1 != NULL ) {
-		if( f2 == NULL ) {
-			return(0); /* files differ */
-			}
-		if( f1->id != f2->id ) {
-			return(0); /* files differ */
-			}
-		f1 = f1->next;
-		f2 = f2->next;
-		}
-
-	/* Here f1 == NULL */
-	if( f2 != NULL ) {
-		return(0); /* files differ */
-		}
-
-	return(1);
-}
-
-/******************************************************************************/
-	void
-copy_info_to_identical_dims( NCVar *vsrc, NCDim *dsrc, size_t dim_len )
-{
-	NCVar	*v;
-	int	i, dims_are_same;
-	NCDim	*d;
-	size_t	j;
-
-	v = variables;
-	while( v != NULL ) {
-		for( i=0; i<v->n_dims; i++ ) {
-			d = *(v->dim+i);
-			if( (d != NULL) && (d->have_calc_minmax == 0)) {
-				/* See if this dim is same as passed dim */
-				dims_are_same = (strcmp( dsrc->name, d->name ) == 0 ) &&
-						equivalent_FDBs( vsrc, v );
-				if( dims_are_same ) {
-					if( options.debug ) 
-						fprintf( stderr, "Dim %s (%d) is same as dim %s (%d), copying min&max from former to latter...\n", dsrc->name, dsrc->global_id, d->name, d->global_id );
-					d->min = dsrc->min;
-					d->max = dsrc->max;
-					d->have_calc_minmax = 1;
-					d->values = (float *)malloc(dim_len*sizeof(float));
-					for( j=0L; j<dim_len; j++ )
-						*(d->values + j) = *(dsrc->values + j);
-					d->is_lat = dsrc->is_lat;
-					d->is_lon = dsrc->is_lon;
-					}
-				}
-			}
-		v = v->next;
-		}
-}
-
-/******************************************************************************
- * Calculate the minimum and maximum values in the dimension structs.  While
- * we are messing with the dims, we also try to determine if they are lat and
- * lon.
- */
-	void
-calc_dim_minmaxes( void )
-{
-	int	i, j;
-	NCVar	*v;
-	NCDim	*d, *tmpd;
-	char	temp_str[1024];
-	nc_type	type;
-	double	temp_double, bounds_max, bounds_min;
-	int	has_bounds, name_lat, name_lon, units_lat, units_lon;
-	size_t	dim_len;
-	size_t	cursor_place[MAX_NC_DIMS];
-
-	v = variables;
-	while( v != NULL ) {
-		for( i=0; i<v->n_dims; i++ ) {
-			d = *(v->dim+i);
-			if( (d != NULL) && (d->have_calc_minmax == 0)) {
-				if( options.debug ) 
-					fprintf( stderr, "...min & maxes for dim %s (%d)...\n", d->name, d->global_id );
-				dim_len = *(v->size+i);
-				d->values = (float *)malloc(dim_len*sizeof(float));
-
-				for( j=0; j<v->n_dims; j++ ) 
-					cursor_place[j] = (int)(*(v->size+j)/2.0);	/* take middle in case 2-d mapped dims apply */
-
-				type = fi_dim_value( v, i, 0L, &temp_double, temp_str, &has_bounds, &bounds_min, 
-								&bounds_max, cursor_place );	/* used to get type ONLY */
-				if( type == NC_DOUBLE ) {
-					for( j=0; j<dim_len; j++ ) {
-						cursor_place[i] = j;
-						type = fi_dim_value( v, i, j, &temp_double, temp_str, &has_bounds, &bounds_min, &bounds_max, cursor_place );
-						*(d->values+j) = (float)temp_double;
-						}
-					d->min  = *(d->values);
-					d->max  = *(d->values + dim_len - 1);
-					}
-				else
-					{
-					if( options.debug ) 
-						fprintf( stderr, "**Note: non-float dim found; i=%d\n", i );
-					d->min  = 1.0;
-					d->max  = (float)dim_len;
-					for( j=0; j<dim_len; j++ )
-						*(d->values+j) = (float)j;
-					}
-				d->have_calc_minmax = 1;
-				
-				/* Try to see if the dim is a lat or lon.  Not an exact science by a long shot */
-				name_lat  = strncmp_nocase(d->name,  "lat",    3)==0;
-				units_lat = strncmp_nocase(d->units, "degree", 6) == 0;
-				name_lon  = strncmp_nocase(d->name,  "lon",    3)==0;
-				units_lon = strncmp_nocase(d->units, "degree", 6) == 0;
-				d->is_lat = ((name_lat || units_lat) && (d->max <  90.01) && (d->min > -90.01));
-				d->is_lon = ((name_lon || units_lon) && (d->max < 360.01) && (d->min > -180.01));
-
-				/* There is a funny thing we need to do at this point.  Think about the following case.
-				 * We want to look at 3 different files, and they all have a dim named 'lon' in them,
-				 * and each is different.  Because this might happen, we can't use the name as an
-				 * indication of a unique dimension.  On the other hand, it is very slow to repeatedly
-				 * reprocess the same dim over and over, especially if it's the time dim in a series
-				 * of virtually concatenated input files.  For that reason, we copy the min and max
-				 * values we just found to all identical dims.
-				 */
-				copy_info_to_identical_dims( v, d, dim_len );
-				}
-			}
-		v = v->next;
-		}
-}
-	
-/********************************************************************************
- * Actually do the "shrinking" of the FLOATING POINT (not pixel) data, converting 
- * it to the small version by either finding the most common value in the square,
- * or by averaging over the square.  Remember that our standard for how to 
- * interpret 'options.blowup' is that a value of "-N" means to shrink by a factor
- * of N.  So, blowup == -2 means make it half size, -3 means 1/3 size, etc.
- */
-	void
-contract_data( float *small_data, View *v, float fill_value )
-{
-	long 	i, j, n, nx, ny, ii, jj;
-	size_t	new_nx, new_ny, idx, ioffset, joffset;
-	float 	*tmpv;
-
-	if( options.blowup > 0 ) {
-		fprintf( stderr, "internal error, contract_data called with a positive blowup factor!\n" );
-		exit(-1);
-		}
-
-	n = -options.blowup;
-	tmpv = (float *)malloc( n*n * sizeof(float) );
-	if( tmpv == NULL ) {
-		fprintf( stderr, "internal error, failed to allocate array for calculating reduced means\n" );
-		exit( -1 );
-		}
-
-	/* Get old and new sizes (new size is smaller in this routine) */
-	nx   = *(v->variable->size + v->x_axis_id);
-	ny   = *(v->variable->size + v->y_axis_id);
-	view_get_scaled_size( options.blowup, nx, ny, &new_nx, &new_ny );
-
-	for( j=0; j<new_ny; j++ )
-	for( i=0; i<new_nx; i++ ) {
-		for( jj=0; jj<n; jj++ )
-		for( ii=0; ii<n; ii++ ) {
-			ioffset = i*n + ii;
-			joffset = j*n + jj;
-			if( ioffset >= nx )
-				ioffset = nx-1;
-			if( joffset >= ny )
-				joffset = ny-1;
-			idx = ioffset + joffset*nx;
-			tmpv[ii + jj*n] = *((float *)v->data + idx);
-			}
-
-		if( options.shrink_method == SHRINK_METHOD_MEAN )
-			small_data[i + j*new_nx] = util_mean( tmpv, n*n, fill_value );
-
-		else if( options.shrink_method == SHRINK_METHOD_MODE ) {
-			small_data[i + j*new_nx] = util_mode( tmpv, n*n, fill_value );
-			}
-		else
-			{
-			fprintf( stderr, "Error in contract_data: unknown value of options.shrink_method!\n" );
-			exit( -1 );
-			}
-		}
-
-
-	free(tmpv);
-}
-
-/******************************************************************************
- * Actually do the "blowup" of the FLOATING POINT (not pixel) data, converting 
- * it to the large version by either interpolation or replication.
- * NOTE this routine is only called when options.blowup > 0!
- */
-	void
-expand_data( float *big_data, View *v )
-{
-	size_t	to_width, x_size, y_size;
-	long	line, i, j, i2, j2;
-	int	blowup, blowupsq;
-	float	step;
-	float	base_val, right_val, below_val, val, bupr;
-	float	base_x, base_y, del_x, del_y;
-	float	est1, est2, frac_x, frac_y;
-	float 	fill_val;
-
-	fill_val = v->variable->fill_value;
-	x_size   = *(v->variable->size + v->x_axis_id);
-	y_size   = *(v->variable->size + v->y_axis_id);
-	
-	blowup   = options.blowup;
-	blowupsq = blowup * blowup;
-	to_width = blowup * x_size;
-	if( (blowupsq < blowup) || (to_width < blowup) ) {
-		fprintf( stderr, "ncview: data_to_pixels: too much magnification\n" );
-		fprintf( stderr, "blowup=%d  blowupsq=%d  to_width=%ld\n",
-				blowup, blowupsq, to_width );
-		exit( -1 );
-		}
-
-	if( options.blowup_type == BLOWUP_REPLICATE ) { 
-		for( j=0; j<y_size; j++ ) {
-			for( i=0; i<x_size; i++ )
-				for( i2=0; i2<blowup; i2++ )
-					*(big_data + i*blowup + j*to_width*blowup + i2) = *((float *)((float *)v->data)+i+j*x_size);
-			for( line=1; line<blowup; line++ )
-				for( i2=0; i2<to_width; i2++ )
-					*(big_data + i2 + j*to_width*blowup + line*to_width) =
-						*(big_data + i2 + j*to_width*blowup);
-			}
-		} 
-	else 	{ /* BLOWUP_BILINEAR */
-		bupr = 1.0/(float)blowup;
-
-		/* Horizontal base lines */
-		for( j=0; j<y_size; j++ )
-		for( i=0; i<x_size-1; i++ ) {
-			base_val  = *((float *)v->data + i   + j*x_size);
-			right_val = *((float *)v->data + i+1 + j*x_size);
-
-			if( close_enough(base_val,  fill_val) || 
-			    close_enough(right_val, fill_val))
-				step = 0.0;
-			else
-				step = (right_val-base_val)*bupr;
-			val = base_val;
-
-			for( i2=0; i2 < blowup; i2++ ) {
-				*(big_data + i*blowup+i2 + j*x_size*blowupsq ) = val;
-				val += step;
-				}
-			}
-
-		/* Vertical base lines */
-		for( j=0; j<y_size-1; j++ )
-		for( i=0; i<x_size; i++ ) {
-			base_val  = *((float *)v->data + i   + j*x_size);
-			below_val = *((float *)v->data + i + (j+1)*x_size);
-			if( close_enough(base_val,  fill_val) || 
-			    close_enough(below_val, fill_val))
-				step = 0.0;
-			else
-				step = (below_val-base_val)*bupr;
-			val = base_val;
-
-			for( j2=0; j2 < blowup; j2++ ) {
-				*(big_data + i*blowup + j*to_width*blowup + j2*to_width ) = val;
-				val += step;
-				}
-			}
-		/* Now, fill in the interior of the square by 
-		 * interpolating from the horizontal and vertical
-		 * base lines.
-		 */
-		for( j=0; j<y_size-1; j++ )
-		for( i=0; i<x_size-1; i++ ) {
-			for( j2=1; j2<blowup; j2++ )
-			for( i2=1; i2<blowup; i2++ ) {
-				frac_x = (float)i2*bupr;
-				frac_y = (float)j2*bupr;
-				base_x = *(big_data + i*blowup + j*to_width*blowup+j2*to_width);
-				right_val = *(big_data + (i+1)*blowup + j*to_width*blowup+ j2*to_width);
-				base_y = *(big_data + i*blowup+i2 + j*to_width*blowup);
-				below_val = *(big_data + i*blowup+i2 + (j+1)*to_width*blowup);
-
-				if( close_enough(base_x,    fill_val) || 
-				    close_enough(right_val, fill_val) || 
-				    (i == x_size-1) )
-					del_x = 0.0;
-				else
-					del_x  = right_val - base_x;
-				if( close_enough(base_y,    fill_val) || 
-				    close_enough(below_val, fill_val) || 
-				    (j == y_size-1) )
-					del_y = 0.0;
-				else
-					del_y  = below_val - base_y;
-				est1 = frac_x*del_x + base_x;
-				est2 = frac_y*del_y + base_y;
-				*(big_data + i*blowup+i2 + j*to_width*blowup + j2*to_width ) =
-					(est1 + est2)*.5;
-				}
-			}
-		/* Fill in right hand side */
-		for( j=0; j<blowup*y_size; j++ )
-		for( i=0; i<blowup; i++ )
-			*(big_data + (x_size-1)*blowup+i + j*to_width ) = fill_val;
-
-		/* Fill in bottom */
-		for( j=0; j<blowup; j++ )
-		for( i=0; i<blowup*x_size; i++ )
-			*(big_data + i + (y_size-1)*to_width*blowup + j*to_width ) = fill_val;
-		}
-}
-
-/******************************************************************************
- * Set the style of blowup we want to do.
- */
-	void
-set_blowup_type( int new_type )
-{
-	if( new_type == BLOWUP_REPLICATE ) 
-		in_set_label( LABEL_BLOWUP_TYPE, "Repl"   );
-	else
-		in_set_label( LABEL_BLOWUP_TYPE, "Bi-lin" );
-
-	options.blowup_type = new_type;
-}
-
-/******************************************************************************
- * If we allowed strings of arbitrary length, some of the widgets
- * would crash when trying to display them.
- */
-	char *
-limit_string( char *s )
-{
-	int	i;
-
-	i = strlen(s)-1;
-	while( *(s+i) == ' ' )
-		i--;
-	*(s+i+1) = '\0';
-
-	if( strlen(s) > MAX_DISPLAYED_STRING_LENGTH )
-		*(s+MAX_DISPLAYED_STRING_LENGTH) = '\0';
-
-	return( s );
-}
-
-/******************************************************************************
- * If we try to print to an already existing file, then warn the user
- * before clobbering it.
- */
-	int
-warn_if_file_exits( char *fname )
-{
-	int	retval;
-	FILE	*f;
-	char	message[1024];
-
-	if( (f = fopen(fname, "r")) == NULL )
-		return( MESSAGE_OK );
-	fclose(f);
-
-	sprintf( message, "OK to overwrite existing file %s?\n", fname );
-	retval = in_dialog( message, NULL, TRUE );
-	return( retval );
-}
-
-/******************************************************************************/
-
-	static void
-handle_time_dim( int fileid, NCVar *v, int dimid )
-{
-	NCDim   *d;
-
-	d = *(v->dim+dimid);
-
-	if( udu_utistime( d->name, d->units ) ) {
-		d->timelike = 1;
-		d->time_std = TSTD_UDUNITS;
-		d->tgran    = udu_calc_tgran( fileid, v, dimid );
-		}
-	else if( epic_istime0( fileid, v, d )) {
-		d->timelike = 1;
-		d->time_std = TSTD_EPIC_0;
-		d->tgran    = epic_calc_tgran( fileid, d );
-		}
-	else if( (d->units != NULL) &&
-		 (strlen(d->units) >= 5) &&
-		 (strncasecmp( d->units, "month", 5 ) == 0 ))  {
-		d->timelike = 1;
-		d->time_std = TSTD_MONTHS;
-		d->tgran    = months_calc_tgran( fileid, d );
-		}
-	else
-		d->timelike = 0;
-}
-
-/******************************************************************************/
-	static int
-months_calc_tgran( int fileid, NCDim *d )
-{
-	char	temp_string[128];
-	float	delta, v0, v1;
-	int	type, has_bounds;
-	double	temp_double, bounds_min, bounds_max;
-
-	if( d->size < 2 ) {
-		return( TGRAN_DAY );
-		}
-
-	type = netcdf_dim_value( fileid, d->name, 0L, &temp_double, temp_string, 0L, &has_bounds, &bounds_min, &bounds_max );
-	if( type == NC_DOUBLE )
-		v0 = (float)temp_double;
-	else
-		{
-		fprintf( stderr, "Note: can't calculate time granularity, unrecognized timevar type (%d)\n",
-			type );
-		return( TGRAN_DAY );
-		}
-
-	type = netcdf_dim_value( fileid, d->name, 1L, &temp_double, temp_string, 1L, &has_bounds, &bounds_min, &bounds_max );
-	if( type == NC_DOUBLE )
-		v1 = (float)temp_double;
-	else
-		{
-		fprintf( stderr, "Note: can't calculate time granularity, unrecognized timevar type (%d)\n",
-			type );
-		return( TGRAN_DAY );
-		}
-	
-	delta = v1 - v0;
-
-	if( delta > 11.5 ) 
-		return( TGRAN_YEAR );
-	if( delta > .95 ) 
-		return( TGRAN_MONTH );
-	if( delta > .03 ) 
-		return( TGRAN_DAY );
-
-	return( TGRAN_MIN );
-}
-
-/******************************************************************************/
-void fmt_time( char *temp_string, double new_dimval, NCDim *dim, int include_granularity )
-{
-	int 	year, month, day;
-
-	if( ! dim->timelike ) {
-		fprintf( stderr, "ncview: internal error: fmt_time called on non-timelike axis!\n");
-		fprintf( stderr, "dim name: %s\n", dim->name );
-		exit( -1 );
-		}
-
-	if( dim->time_std == TSTD_UDUNITS ) 
-		udu_fmt_time( temp_string, new_dimval, dim, include_granularity );
-
-	else if( dim->time_std == TSTD_EPIC_0 ) 
-		epic_fmt_time( temp_string, new_dimval, dim );
-
-	else if( dim->time_std == TSTD_MONTHS ) {
-		/* Format for months standard */
-		year  = (int)( (new_dimval-1.0) / 12.0 );
-		month = (int)( (new_dimval-1.0) - year*12 + .01 );
-		month = (month < 0) ? 0 : month;
-		month = (month > 11) ? 11 : month;
-		day   =
-		   (int)( ((new_dimval-1.0) - year*12 - month) * 30.0) + 1;
-		sprintf( temp_string, "%s %2d %4d", month_name[month],
-				day, year+1 );
-		}
-
-	else
-		{
-		fprintf( stderr, "Internal error: uncaught value of tim_std=%d\n", dim->time_std );
-		exit( -1 );
-		}
-}
-
-/*********************************************************************************************
- * like strncmp, but ignoring case
- */
-	int
-strncmp_nocase( char *s1, char *s2, size_t n )
-{
-	char 	*s1_lc, *s2_lc;
-	int	i, retval;
-
-	if( (s1==NULL) || (s2==NULL))
-		return(-1);
-
-	s1_lc = (char *)malloc(strlen(s1)+1);
-	s2_lc = (char *)malloc(strlen(s2)+1);
-
-	for( i=0; i<strlen(s1); i++ )
-		s1_lc[i] = tolower(s1[i]);
-	s1_lc[i] = '\0';
-	for( i=0; i<strlen(s2); i++ )
-		s2_lc[i] = tolower(s2[i]);
-	s2_lc[i] = '\0';
-
-	retval = strncmp( s1_lc, s2_lc, n );
-
-	free(s1_lc);
-	free(s2_lc);
-
-	return(retval);
-}
-
-/**************************************************************************************************
- * Determine if the passed string names a lat or lon 
- */
-void determine_lat_lon( char *s_in, int *is_lat, int *is_lon )
-{
-	char	*s;
-	size_t	n, i;
-
-	/* Get lower case version of input name */
-	n = strlen(s_in);
-	s = (char *)malloc( sizeof(char) * (n+2));
-
-	for( i=0; i<n; i++ )
-		s[i] = tolower( s_in[i] );
-
-	*is_lat = 0;
-	*is_lon = 0;
-
-	if( strncasecmp( "lat", s, 3 ) == 0 ) {
-		*is_lat = 1;
-		free( s );
-		return;
-		}
-
-	if( strncasecmp( "lon", s, 3 ) == 0 ) {
-		*is_lon = 1;
-		free( s );
-		return;
-		}
-
-	if( strstr( s, "lat" ) != NULL ) {
-		*is_lat = 1;
-		free( s );
-		return;
-		}
-
-	if( strstr( s, "lon" ) != NULL ) {
-		*is_lon = 1;
-		free( s );
-		return;
-		}
-
-	fprintf( stderr, "Error, cannot figure out whether this coordinate variable is a latitude or a longitude, just based on its name: %s\n", s_in );
-	fprintf( stderr, "Please name it either Latitude or Longitude, as appropriate, or send email to dpierce at ucsd.edu if you have a case that does not fit this description so I can fix it.\n" );
-	exit(-1);
-}
-
diff --git a/src/utils.o b/src/utils.o
deleted file mode 100644
index ee3a826..0000000
Binary files a/src/utils.o and /dev/null differ
diff --git a/src/view.c b/src/view.c
index 603307f..1ff72a1 100644
--- a/src/view.c
+++ b/src/view.c
@@ -87,6 +87,10 @@ static void 		invalidate_variable( NCVar *var );
 static void 		plot_XY_sc( size_t *start, size_t *count );
 static void 		mouse_xy_to_data_xy( int mouse_x, int mouse_y, int blowup, size_t *data_x, size_t *data_y );
 static int 		view_data_has_missing( View *v );
+static void 		view_construct_scalar_coord_str( char *str, int slen );
+static float 		view_calc_minval_float( float *arr, size_t n );
+static float 		view_calc_maxval_float( float *arr, size_t n );
+static void 		strip_trailing_zeros( char *s );
 
 #define NFRAMES_RECORD	10
 static int    n_new_frame_times=0;			/* Numer of valid entries in following two arrays */
@@ -228,7 +232,7 @@ set_scan_variable( NCVar *var )
 		/* If the new var has a different shape than the old var,
 		 * then clear out any old, previous overlay we might be using.
 		 */
-		if( (xdim_new == -1) || (xdim_old == -1) || (ydim_new == -1) || (ydim_old == -1) || 
+		if( (xdim_new == NULL) || (xdim_old == NULL) || (ydim_new == NULL) || (ydim_old == NULL) || 
 				(xdim_new->size != xdim_old->size) || (ydim_new->size != ydim_old->size))
 			do_overlay(OVERLAY_NONE,NULL,TRUE);
 
@@ -347,6 +351,7 @@ set_scan_buttons( View *local_view )
 {
 	static int	set_state;
 	char		*label    = NULL;
+	char		scalar_coord_str[1024];
 
 	set_state = BUTTONS_ALL_ON;
 
@@ -371,6 +376,9 @@ set_scan_buttons( View *local_view )
 
 	set_buttons( set_state );
 	in_set_label( LABEL_SCAN_PLACE, label );
+
+	view_construct_scalar_coord_str( scalar_coord_str, 1020 );
+	in_set_label( LABEL_SCALAR_DIMS, scalar_coord_str );
 }
 
 /********************************************************************************
@@ -449,7 +457,7 @@ change_view( int delta, int interpretation )
 	void
 set_scan_view( size_t scan_place )
 {
-	char	temp_string[1024], view_place[1024];
+	char	temp_string[1024], view_place[1024], scalar_coord_str[1024];
 	size_t	size;
 	char	*dim_name;
 	double	new_dimval, bound_min, bound_max;
@@ -529,6 +537,12 @@ set_scan_view( size_t scan_place )
 	if( options.want_extra_info ) {
 		in_set_label( LABEL_CCINFO_2, temp_string );
 		}
+
+	/* Construct string showing the values of the scalar coordinates
+	 * for this variable, if any 
+	 */
+	view_construct_scalar_coord_str( scalar_coord_str, 1020 );
+	in_set_label( LABEL_SCALAR_DIMS, scalar_coord_str );
 }
 
 /********************************************************************************
@@ -624,7 +638,7 @@ view_draw( int allow_framestore_usage, int force_range_to_frame )
 			if( view->scan_axis_id != -1 ) {
 				scan_size  = *(view->variable->size  + view->scan_axis_id);
 				if( (frameno == (scan_size-1)) && (which_button_pressed() == BUTTON_PAUSE)) {
-					in_timer_set( view_check_new_data, 0, 1000L );
+					in_timer_set( (XtTimerCallbackProc)view_check_new_data, 0, 1000L );
 					}
 				}
 			return(0);
@@ -676,7 +690,7 @@ view_draw( int allow_framestore_usage, int force_range_to_frame )
 	if( view->scan_axis_id != -1 ) {
 		scan_size  = *(view->variable->size  + view->scan_axis_id);
 		if( (frameno == (scan_size-1)) && (which_button_pressed() == BUTTON_PAUSE)) {
-			in_timer_set( view_check_new_data, 0, 1000L );
+			in_timer_set( (XtTimerCallbackProc)view_check_new_data, 0, 1000L );
 			}
 		}
 
@@ -724,7 +738,7 @@ view_check_new_data( int unused )
 		}
 
 	if( ! has_grown ) {
-		in_timer_set( view_check_new_data, 0, 1000L );
+		in_timer_set( (XtTimerCallbackProc)view_check_new_data, 0, 1000L );
 		return;
 		}
 
@@ -965,7 +979,7 @@ initial_determine_scan_axes( View *view, NCVar *var )
 
 	/* For now, just pick the last two to be the Y and X axes.
 	 */ 
-	n_dims = n_strings_in_list( dimlist );
+	n_dims = stringlist_len( dimlist );
 	switch( n_dims ) {
 		case 1:
 			view->scan_axis_id = -1;
@@ -1255,8 +1269,8 @@ view_set_scan_dims( void )
 		if( message == MESSAGE_CANCEL )
 			return;
 		inv_dim_list = NULL;
-		add_to_stringlist( &inv_dim_list, s->string, NULL );
-		add_to_stringlist( &inv_dim_list, new_dim_list->string, NULL );
+		stringlist_add_string( &inv_dim_list, s->string, NULL, SLTYPE_NULL );
+		stringlist_add_string( &inv_dim_list, new_dim_list->string, NULL, SLTYPE_NULL );
 		new_dim_list = inv_dim_list;
 		}
 	if( new_x_id == new_y_id ) {
@@ -1304,6 +1318,8 @@ view_set_axis( View *local_view, int dimension, char *new_dim_name )
 	NCVar	*v;
 
 	v      = local_view->variable;
+	new_id = -1;
+	old_id = -1;
 
 	switch( dimension ) {
 		case DIMENSION_X:
@@ -1597,7 +1613,7 @@ init_saveframes()
 	void
 invalidate_all_saveframes()
 {
-	size_t	i, n_scan_entries;
+	size_t	i;
 
 	if( view == NULL )
 		return;
@@ -1708,7 +1724,7 @@ re_determine_scan_axes( View *new_view, NCVar *new_var, View *old_view )
 	NCDim	*old_dim;
 
 	old_var = old_view->variable;
-	old_n_scannable_dims = n_strings_in_list( 
+	old_n_scannable_dims = stringlist_len( 
 		fi_scannable_dims( old_var->first_file->id, old_var->name) );
 
 	for( i=0; i<old_n_scannable_dims; i++ ) {
@@ -2113,6 +2129,85 @@ view_report_position( int x, int y, unsigned int button_mask )
 }
 
 /**************************************************************************************/
+	static void
+view_construct_scalar_coord_str( char *str, int slen ) 
+{
+	size_t	ts;
+	FDBlist	*fdb;
+	int	isc, nsc, fdb_index, space_avail;
+	NCDim_map_info *sdmi;
+	float	fval, fmin, fmax;
+	char	*funits, tstr[1024], v1[100], v2[100];
+	int	displaying_along_time_dim, nfiles;
+
+	str[0] = '\0';
+
+	if( (view == NULL) || (view->variable == NULL) || (view->variable->n_scalar_coords == 0) 
+				|| (view->var_place == NULL)) {
+		return;
+		}
+
+	/* Get the time step (value of first dim, which must be the only 
+	 * dim that is virtually concatenated along different files). 
+	 */
+	ts = *(view->var_place);
+
+	/* The file associated with this time step */
+	fdb = view->variable->timestep_2_fdb[ts];
+
+	/* The integer position of this FDB on the var's list of FDBs. 
+	 * We need this because the scalar data is cached by FDB, *not*
+	 * by the variable's timestep
+	 */
+	fdb_index = fdb->index;
+
+	/* See if we are displaying ALONG the time dim. If we are, then we 
+	 * check to see if the scalar coords change along the time
+	 * dim. If they do, we just print <varies>. Otherwise, we print
+	 * the value as per usual 
+	 */
+	displaying_along_time_dim = ((view->x_axis_id == 0) || (view->y_axis_id == 0));
+
+	/* Get all scalar dims associated with this var and this file */
+	nsc = view->variable->n_scalar_coords;
+	for( isc=0; isc<nsc; isc++ ) {
+		sdmi   = view->variable->scalar_dim_map_info[isc];
+		fval   = sdmi->data_cache[fdb_index];	/* NOTE! this is NOT [timtestep], it's [fdb_number] */
+		snprintf( v1, 95, "%f", fval );
+		strip_trailing_zeros( v1 );
+		funits = sdmi->coord_var_units;
+
+		if( displaying_along_time_dim && (! sdmi->scalar_all_same)) {
+			nfiles = view->variable->last_file->index + 1;	/* number of files this var lives in */
+			fmin = view_calc_minval_float( sdmi->data_cache, nfiles );
+			fmax = view_calc_maxval_float( sdmi->data_cache, nfiles );
+			snprintf( v1, 95, "%f", fmin );
+			strip_trailing_zeros( v1 );
+			snprintf( v2, 95, "%f", fmax );
+			strip_trailing_zeros( v2 );
+			snprintf( tstr, 1020, "%s=%s -> %s %s", sdmi->coord_var_name, v1, v2, funits );
+			}
+		else
+			snprintf( tstr, 1020, "%s=%s %s", sdmi->coord_var_name, v1, funits );
+
+		if( isc != (nsc-1)) 
+			strcat( tstr, "; " );
+
+		/* Only add on this new string if there is room for it */
+		space_avail = (slen-2) - strlen(str);
+		if( space_avail <= 5 ) return;
+		if( strlen(tstr) < space_avail )
+			strcat( str, tstr );
+		else
+			{
+			tstr[ space_avail ] = '\0';
+			strcat( str, tstr );
+			return;
+			}
+		}
+}
+
+/**************************************************************************************/
 /* This reports the mouse location in the popup XY graph (the SciPlot widget) */
 	void
 view_report_position_vals( float xval, float yval, int plot_index )
@@ -2398,15 +2493,15 @@ plot_XY()
 	int	X_axis, i, x_window, y_window;
 	size_t	*start, *count, data_x, data_y, x_size, y_size, n;
 
-	if( options.debug )
-		fprintf( stderr, "plot_XY: entering with axisid=%d\n", X_axis );
-
 	X_axis = view->plot_XY_axis;
 	if( X_axis == -1 ) {
 		in_error( "Error! I have no valid axis to plot along!\n" );
 		return;
 		}
 
+	if( options.debug )
+		fprintf( stderr, "plot_XY: entering with axisid=%d\n", X_axis );
+
 	in_query_pointer_position( &x_window, &y_window );
 	if( (x_window < 0) || (y_window < 0) ) {
 		fprintf( stderr, "OUT OF WINDOW!!\n" );
@@ -2766,7 +2861,7 @@ plot_XY_sc( size_t *start, size_t *count )
 	 */
 	dimlist = NULL;
 	/* Put the current dim first on the list */
-	add_to_stringlist( &dimlist, (*(view->variable->dim + dim_to_plot))->name, NULL );
+	stringlist_add_string( &dimlist, (*(view->variable->dim + dim_to_plot))->name, NULL, SLTYPE_NULL );
 	for( i=0; i<view->variable->n_dims; i++ )
 		/* We are using here the fact that view->variable->dim was initialized
 		 * so that non-scannable dims were set to NULL.  However, this can still
@@ -2776,7 +2871,7 @@ plot_XY_sc( size_t *start, size_t *count )
 		 */
 		if( (*(view->variable->dim+i) != NULL) && (i != dim_to_plot)
 		    && (*(view->variable->size+i) > 1)) 
-			add_to_stringlist( &dimlist, (*(view->variable->dim + i))->name, NULL );
+			stringlist_add_string( &dimlist, (*(view->variable->dim + i))->name, NULL, SLTYPE_NULL );
 
 	if( options.debug ) {
 		fprintf( stderr, "about to call in_popup_XY_graph...\n" );
@@ -2952,3 +3047,40 @@ void view_recompute_colorbar( void )
 		fprintf( stderr, "view_recompute_colorbar: exiting\n" );
 }
 
+/***************************************************************************/
+	static float
+view_calc_minval_float( float *arr, size_t n )
+{
+	float	retval=1.e30;
+	size_t	i;
+	
+	for( i=0L; i<n; i++ )
+		if( arr[i] < retval )
+			retval = arr[i];
+	return( retval );
+}
+
+/***************************************************************************/
+	static float
+view_calc_maxval_float( float *arr, size_t n )
+{
+	float	retval=-1.e30;
+	size_t	i;
+	
+	for( i=0L; i<n; i++ )
+		if( arr[i] > retval )
+			retval = arr[i];
+	return( retval );
+}
+
+/***************************************************************************/
+	static void
+strip_trailing_zeros( char *s )
+{
+	int	i;
+
+	i = strlen(s) - 1;
+	while( (i > 0 ) && (s[i] == '0' ) && (s[i-1] != '.')) 
+		s[i--] = '\0';
+}
+
diff --git a/src/view.o b/src/view.o
deleted file mode 100644
index 0edc486..0000000
Binary files a/src/view.o and /dev/null differ
diff --git a/src/x_interface.o b/src/x_interface.o
deleted file mode 100644
index 8ce731d..0000000
Binary files a/src/x_interface.o and /dev/null differ
diff --git a/stamp-h1 b/stamp-h1
deleted file mode 100644
index 4547fe1..0000000
--- a/stamp-h1
+++ /dev/null
@@ -1 +0,0 @@
-timestamp for config.h

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/ncview.git



More information about the Pkg-grass-devel mailing list